Solving non-linear equation in vector form
显示 更早的评论
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.
采纳的回答
更多回答(2 个)
syms u t
fun=matlabFunction( solve(t^2/64==u,t) );
u2=[1,4,9];
t1=fun(u2)
Matt J
2021-4-28
u2 = rand(1,1000);
t1=8*sqrt(u2);
3 个评论
Tayyab Khalil
2021-4-28
Matt J
2021-4-28
All the commands in my solution are Matlab commands...
Tayyab Khalil
2021-4-28
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!