Conversion of Mathematica code to matlab
1 回表示 (過去 30 日間)
古いコメントを表示
I have the following code in mathematical and need to convert it into matlab but cant for the life of me understand ow to do it, though i think i need to use the 'fzero'; command. Please could someone help me or give me a hint?
function 'f' has already been defined but i need to find its roots for where variable a is from 0-0.6 etc
list1=For[a=-0.01, a<0.6, a+=0.01; sol=Findroot[f,{u, 1.00,1.10}];
v1[i] = sol[[1,2]]; i++]
2 件のコメント
回答 (2 件)
Walter Roberson
2013 年 3 月 4 日
vl = arrayfun(@(a) fzero( @(x) f(x,a), [1 1.1] ), -0.01 : 0.01 : 0.6-eps);
the "-eps" is to recreate the "<" part of "<0.6". Using 0.5 instead might work.
12 件のコメント
ABHIJAY PANDEY
2016 年 9 月 6 日
f[x_]=0.09*sin[x]+0.085*sin[x-1] plot[f[x],{x,-2,2}] can anybody please tell me the matlab code for this mathematica code.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!