Info

This question is closed. Reopen it to edit or answer.

How would I set the start point of the second set of vectors back to the end of the previous one in a push button in gui?

1 view (last 30 days)
These original vectors were just in a function use to plot a bunch of different vectors on a 3d plot, one after another.
x0 = 0
y0 = 0
z0 = 0
x1 = 10/tan(pi/6)
y1 = 10
z1 = 0
xa = (x0,x1)
ya = (y0,y1)
za = (z0,z1)
They were originally starting from the previous set of vectors, then they were placed into a push button for a gui and the only way to get them to work was to set the start of the vectors xa,ya,za to '0'. Is there any way to get these vectors to begin from the end of the previous one within a push button?
x1 = linspace(0,10/tan(pi/6),5000);
y1 = linspace(0,10,5000);
z1 = linspace(0,0,5000);
xa = [0,x1];
ya = [0,y1];
za = [0,z1];
Kind of a noob, any help/ideas would be appreciated.
  1 Comment
Geoff Hayes
Geoff Hayes on 21 Oct 2014
Wes - what happened if a 0 wasn't set to the start of the vectors xa,ya,za? Without seeing the code that you currently have in the push button, it is difficult to understand what the current problem is and how it should be fixed. is something plotted every time the push button is pressed? Can the user press it multiple times, or just once? How is xa,ya,za used on subsequent presses of the button?

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!