How to use symbolic equation?
1 回表示 (過去 30 日間)
古いコメントを表示
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1592596/image.png)
it says, 'data needs to be numeric, datetime, duration, categorical, doubled type array'
I want to plot 'gm' vs 'Ao'
0 件のコメント
採用された回答
Star Strider
2024 年 1 月 17 日
syms Wosc R C gm
Ao = gm*R/(1+2*pi*Wosc*R*C);
pretty(Ao)
R = 1000;
C = 27.6E-12;
Wosc = 1E6;
Ao = subs(Ao)
Ao = vpa(Ao, 5)
figure
fplot(Ao, [1E-9, 1E-4])
grid
Ax = gca;
Ax.XScale = 'log';
xlabel('gm')
ylabel('Ao')
.
その他の回答 (1 件)
Walter Roberson
2024 年 1 月 17 日
The basic problem is that subs() does not change the thing being substituted into. You would need to have Ao = subs(...)
Also, you cannot plot() a symbolic expression. You can fplot() it -- if you do then the default is to plot over the range -5 to +5, so you would want to supply the interval to fplot() over.
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!