I am relatively new to maltab. I am trying to get the X and Y coordinates of a function by parts I plotted with fplot. I tried doing the following:
However, I kept receiving a warning that said: 'Having two output arguments for fplot will be removed in a future release. Use the XData and
YData properties instead. ' Also, I think that x1 and y1 could have different lengths, and I needed them to have the same length.
I leave you here the following code I wrote:
Mfinalrueda = piecewise(0<=t_f<=3.7, Mdestot,3.7<= t_f <=10, Mdescte, 10<=t_f<=15,Mdessub,15<=t_f<=20, 0);
When I tried using XData and YData, I did something similar to:
but did not work, because apparently you can't name an fplot.
So yeah, basically I'm stuck trying to obtain the x and y coordinates from a function by parts (I want to make a two column matrix, with the same length later on, that's why I would like them to be the same length).
Hope I explained myself clearly. Please tell me if I did not.(English is not my first language)
Thank you very much in advance