Borrar filtros
Borrar filtros

Plotting Issue for a quartic equation

2 visualizaciones (últimos 30 días)
Yu Xiong
Yu Xiong el 13 de Feb. de 2015
Respondida: John D'Errico el 13 de Feb. de 2015
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)

Respuestas (1)

John D'Errico
John D'Errico el 13 de Feb. de 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.

Categorías

Más información sobre Get Started with MuPAD en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by