Plotting Issue for a quartic equation
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi
I just got an issue for plotting a quartic equation like y = (x.^2+1).^2/x.^2 which always give me back a linear spot-points figure. However, I tried to use MuPAD to plot this function which returned the result is what I expected. So, I am thinking it might be the expression format which was defined differently in MATLAB.
Could someone point out the issue?
Thanks Yu
Code in MATLAB (Actually, it will be four functions in total)
y = (x.^2+1).^2/x.^2;
figure
plot(x,y)
Code in MuPAD
plot(y=(R^2 + 1)^2/R^2, y=(R^2 + 4)^2/(4*R^2), y=(R^2 + 9)^2/(9*R^2), y=(R^2 + 16)^2/(16*R^2), R=0..5, y=0..10)
0 commentaires
Réponses (1)
John D'Errico
le 13 Fév 2015
You seem to understand about the use of and need for the dot operators, such as .^, so why do you not use ./ for division? That little . before the / is important. Use it.
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with MuPAD dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!