How to Plot a Graph for a Range of Values
58 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
madhan ravi
am 15 Nov. 2018
Bearbeitet: madhan ravi
am 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 Kommentare
Weitere Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!