robax25
- 238
- 3
how I print x^2/3
Here is my code
Here is my code
Matlab:
x=-100:100;
y=x.^(2/3),
plot(x,y)
The discussion revolves around how to correctly plot the function \( y = x^{2/3} \) in MATLAB, addressing issues related to the graph's output and the handling of negative values of \( x \).
Participants express differing views on the cause of the graphing issue, with some focusing on the handling of negative values and others on potential syntax errors. The discussion remains unresolved regarding the best approach to correct the plotting issue.
Participants have not fully explored the implications of plotting complex numbers or the specific behavior of MATLAB with negative inputs for this function.
x=-100:100;
y=x.^(2/3),
plot(x,y)
It is hard to help you without more details.robax25 said:Matlab does not display right graph. I think that it displays wrong.
x=-100:100;
y=real(x.^(2/3)) %%Real part only
plot(x,y)