MapLine function assistance requested
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!