MapLine function assistance requested

1 view (last 30 days)
Joe Howes
Joe Howes on 10 May 2012
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.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!