This code will only produce Tau_a as a single number and I want it to output a matrix evaluated at each x value. How do I fix this? Thanks
eta0=1200; %Pa-s
Tau_c=20000; %Pa
n=0.3;
x=[10,25,50,100,200,400,600,800,1200]; %s^-1, where x is is gamma dot
Tau_a=(eta0.*x)/((1+((eta0.*x)/Tau_c).^2).^((1-n)/2)); %shear stress strain equation, Non-Newtonian

 採用された回答

dpb
dpb 2016 年 10 月 22 日

2 投票

You missed the 'dot' operator for the divide...
Tau_a=eta0*x./((1+(eta0*x/Tau_c).^2).^((1-n)/2));
NB: I removed one level of nested parens that were superfluous and you can always multiply any sized array/vector by a constant so while it didn't hurt, the dot operator wasn't needed on the multiplies

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2016 年 10 月 21 日

コメント済み:

2016 年 10 月 22 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by