In need of decreasing exponential smooth curve

2 ビュー (過去 30 日間)
Abhinandana R
Abhinandana R 2019 年 2 月 10 日
コメント済み: Abhinandana R 2019 年 2 月 10 日
u=0.3; pi=22/7; g=80;
l=20; d=10; p=1;
r=linspace(0,1,10);
m=tand(p)
a=(r-m*(d+l)).^-2-((r-m*l).^-2)
q=(pi*r.^4*g)/(8*u*l)
t=(2*u*q.*a)/(pi*m)
plot(r,t)
I need a decreasing smooth exponential curve. please help me

採用された回答

Stephan
Stephan 2019 年 2 月 10 日
編集済み: Stephan 2019 年 2 月 10 日
Your linspace call will lead to 10 results calculated in the interval of 0...1. If you leave the 10 away, the standard is 100 values, which gives a smoother curve:
u=0.3; g=80;
l=20; d=10; p=1;
r=linspace(0,1);
m=tan(p);
a=(r-m*(d+l)).^-2-((r-m*l).^-2);
q=(pi*r.^4*g)/(8*u*l);
t=(2*u*q.*a)/(pi*m);
plot(r,t)
You should also do not overwrite pi - it is a constant in Matlab - no need to define it.
Best regards
Stephan
  3 件のコメント
Stephan
Stephan 2019 年 2 月 10 日
編集済み: Stephan 2019 年 2 月 10 日
what about
m=exp(p)
for the interval 0...1 it is a smooth decreasing curve. That is the desired result?
Abhinandana R
Abhinandana R 2019 年 2 月 10 日
yeah thanks !

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by