How to divide a line into several parts and obtain the coordinates?
Ältere Kommentare anzeigen
Hi, I want to create a small script that can allow me to divide a line into segments and then retrieve me the coordinates of the new points. The line is vertical so I only need the 'y' values. I create the following, but I don't know how to make the scrip save me all the results of the loop in one matrix, it just save me the last one. Here is the script:
B=[9 3]; % first point
E=[9 10]; % second point
BE=E(2)-B(2); % distance between the two points in y
No_lam=input('Enter # of laminas:');
l=BE/No_lam;
Bi=(B(2))-l;
New=[];
for n=0:No_lam
Bi=[Bi+l]
end
I will appreciate some help with this. Martha
Akzeptierte Antwort
Weitere Antworten (1)
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!