Info
This question is closed. Reopen it to edit or answer.
How can I derive solution in matrix form?
1 view (last 30 days)
Show older comments
i want to get solutions with varying x from 0.201 to 0.210
the problem i have is like the below
x=0.201:0.001:0.210;
eqn=x^2*y^4+~~~~~~
and i want to get solutions of y in matrix form
and plot it with x
plot(x,y)
How can i get this solution in matrix form?
0 Comments
Answers (2)
Mischa Kim
on 26 Mar 2015
Hello Junsoo, what relevance has eqn in computing y as a function of x?
In general, you need to use the dot notation when e.g. multiplying vectors. Try for example:
x = 0.201:0.001:0.210;
y = x.^2.*sqrt(3*x);
plot(x,y)
4 Comments
James Tursa
on 26 Mar 2015
Use the dot versions of the operators to get element-wise operations. E.g.,
eqn=x.^2.*y.^4+~~~~~~ % <-- Note the use of .* and .^ instead of just * and ^
4 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!