I have created my own matlab function that gives 2 outpus for 4 inputs. I then created a for loop where one of the inputs changes and call the function. It works fine but I need all the values that are output for the two output values to be stored in separate arrays.
Here is my working code:
for theta_launch=0:pi./32:pi./4
[y_impact,TOF] = myPotatof_GRT(theta_launch,dt,v_init,D_targ)
theta_values=[theta_values theta_launch]
I have the theta_values coming out in an 1x9 array just like I want, however when I try and do a similar thing with my y_impact and TOF values, I get error message after error message. I've tried several differnt things but nothing seems to work.
Thnak you in advance.
Yes this is for a class, however what I have compleated above I have already turned into my instructor for grading and would just like to finish it on my own because he doen's get around to grading and providing the solutions for about a week, and I would like to get this sorted before my next assignment.
0 Comments
Sign in to comment.