Solving non-linear equation in vector form
Show older comments
Hi all, hope you are doing well.
Soi have a simple equation where the known value is a vector. So i need to get a vector as the solution.
The equation is very simple and can be easily caluclated by hand but i require it to be solved using Matlab.
Here is the code i have tried:
u2 = rand(1,1000);
syms t1
eq = t1.^2/64 == u2;
solve(eq, t1)
Any help would be appreciated, thanks.
Accepted Answer
More Answers (2)
syms u t
fun=matlabFunction( solve(t^2/64==u,t) );
u2=[1,4,9];
t1=fun(u2)
1 Comment
Tayyab Khalil
on 28 Apr 2021
Matt J
on 28 Apr 2021
u2 = rand(1,1000);
t1=8*sqrt(u2);
3 Comments
Tayyab Khalil
on 28 Apr 2021
Matt J
on 28 Apr 2021
All the commands in my solution are Matlab commands...
Tayyab Khalil
on 28 Apr 2021
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!