finding curvature of plot
5 views (last 30 days)
Show older comments
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.
6 Comments
Bruno Luong
on 1 Nov 2018
- Remove function code in your script.
- But save function code in LineCurvature2D.m
Accepted Answer
KSSV
on 2 Nov 2018
Edited: KSSV
on 2 Nov 2018
- Download the function and save it in a folder
- Copy your 315 Big.txt file in this folder.
- Open MATLAB, go to the folder where you have saved the function and txt file.
- Now type the following:
Vertices =load('315 Big.txt');
Vertices(:,1) = [] ; % because all zeros
k=LineCurvature2D(Vertices) ;
k
3 Comments
More Answers (0)
See Also
Categories
Find more on Surfaces, Volumes, and Polygons in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!