Here is my code for the plotting: for i = 1:lengthĮzplot(velocity(i),)īefore these lines in my code, inputting velocity, times, and diff/int occur.ĮDIT: Also, is it wrong to align my velocities in a vector? I am confused on how to call on these later on to evaluate. I also use a loop for length(velocity) to get the start/stop times for each time slot of the velocities. I have these velocities stored in as symbolic functions using syms t and the vector would look something like. In my problem, there are 2 time ranges so it is a vector with 2 positions. I have velocity set up as a vector containing each velocity equation per time range. WebThe key function in Matlab to create a symbolic representation of data is: sym () or syms if you have multiple symbols to make. I thought using 'hold on' would work, but perhaps it does not work for ezplot? I am using symbolic functions also because this is what seems to be the easiest for differentiation/integration from the MathWorks documentation. This is an extra problem for a non-MATLAB class and my course didn't really cover symbolic functions. However, when I run my loop to plot, it only uses the last function/range for the plot. I am trying to plot multiple functions on one graph using symbolic functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |