MapLine function assistance requested
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
hi i am really struggling with writing a function called mapline i have started but seem to be getting knowhere if anyone could help it would be greatly appreciated. the info given is
write a function that takes a curve x:j ->R^n and a map M:R^n -> R^n and returns the image y of x under M, given by the graph y:j ->R^n, y(s)= M(x(s)). the first line of the function is
function [y,snew] = MapLine(M,x,maxdist,maxangle)
so far i have
function [y,snew] = MapLine1(M,x,maxdist,maxangle)
G=0;
m=0;
spreads=length(G);
sharps=zeros(m);
[n,N]=size(x);
y(s)=M(x(s));
snew=s;
j=[s(1),s(end)];
for i=1:N
x(:,i)=x(s(i));
y(:,i)=M(:,i);
end
now there are meant to be two refinements in there (one to inser points when the distance is to large and the other when the angle is too sharp) but all i really need is how to start this off and i think i can get the rest.
any help would be great.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!