Trying to plot from 3 to 10 but the graph shows blank. The numerator and denominator plot seperately so I think I must be telling matlab to divide in the wrong way. Here is my code:
x3 = linspace(3,10,100);
piot(x3,(2*x3+1)/((3*x3-1).^(1/3)))

 채택된 답변

Kevin Phung
Kevin Phung 2019년 1월 29일

0 개 추천

x3 = linspace(3,10,100);
y = (2.*x3+1)./((3.*x3-1).^(1/3));
plot(x3,y)

추가 답변 (1개)

madhan ravi
madhan ravi 2019년 1월 29일
편집: madhan ravi 2019년 1월 29일

0 개 추천

You just have to put ./ instead of / , it’s called element wise operation in MATLAB see https://www.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html .
Remark: plot not piot.

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

질문:

2019년 1월 29일

편집:

2019년 1월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by