How to make a function handle from variable consisting of a function
이전 댓글 표시
I have a problem like this for example.
x = sym('x',[7,1]);
phi = [ (10001*x2)/800000 - (10001*x1)/400000 + (10001*x3)/600000 - (10001*x4)/1600000 + (10001*x5)/3000000 + (10001*x6*x7)/200000];
% ** This phi was copied from output just so you see how it looks
Is there a way I can make a function handle kind of like this?
phi1 = @(x)phi
(I know this doesn't work but hopefully you get what I am trying to do) Basically I can't explicitly write out the function because it is generated from another algorithm. I don't know the syntax, or if you can even do this.
Also, can someone explain the difference between the operator @ and matlabFunction? Thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!