MATLAB: Finding curvature of plot

curvature

i started with calling out my txt file this way:
[z,x,y] = textread ('D:\Matlab\315 Big.txt' ,'%f %f %f', 100); or
load('D:\Matlab\315 Big.txt');or
M =load('D:\Matlab\315 Big.txt');
and then i continue on with the whole page of function for curvature following the link. however it prompts:function k=LineCurvature2D(Vertices,Lines) ↑ Error: Function definition not supported in this context. Create functions in code file.
how should i proceed? i am totally clueless about Matlab.

Best Answer

  1. Download the function and save it in a folder
  2. Copy your 315 Big.txt file in this folder.
  3. Open MATLAB, go to the folder where you have saved the function and txt file.
  4. Now type the following:
Vertices =load('315 Big.txt');
Vertices(:,1) = [] ; % because all zeros
k=LineCurvature2D(Vertices) ;
k
Related Question