How to Plot a Graph for a Range of Values
58 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
madhan ravi
le 15 Nov 2018
Modifié(e) : madhan ravi
le 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 commentaires
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!