How to Plot a Graph for a Range of Values
65 views (last 30 days)
Show older comments
I am working on a problem in mechanics and have obtained an expression for the force on an object: the expression contains several constants and a parameter. In the code elsewhere I have stated that this parameter just has an arbitrary value of 1 after dimensionalisation, but I need to now allow it to vary from 0 to 1 and plot the expression as a function on a graph depending on the parameter, what would be the easiest way of doing this?
I know MATLAB has a plot(X,Y) function, but obviously this will not work immediately as I have already fixed the parameter essentially arbitrarily just to obtain a numerical value which I can compare with other expressions.
0 Comments
Accepted Answer
madhan ravi
on 15 Nov 2018
Edited: madhan ravi
on 15 Nov 2018
how about this example: (if it doesn't work provide your code and datas)
syms x(t)
x(t)=t*exp(t-1)
fplot(x(t),[0 1]) % ranging from 0 to 1
2 Comments
More Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!