필터 지우기
필터 지우기

Plotting Issue for a quartic equation

조회 수: 2 (최근 30일)
Yu Xiong
Yu Xiong 2015년 2월 13일
답변: John D'Errico 2015년 2월 13일
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)

답변 (1개)

John D'Errico
John D'Errico 2015년 2월 13일
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.

카테고리

Help CenterFile Exchange에서 Get Started with MuPAD에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by