How can I connect my equations for a shear/bending moment diagram?

4 ビュー (過去 30 日間)
matlabuser
matlabuser 2020 年 4 月 24 日
回答済み: Pravin Jagtap 2020 年 4 月 27 日
I have a 1.2 m beam. That is the vector l. SN1, SN2, and SN3 represent the three equations for my shear force diagram. When I go to plot them, they are disconnected. That is the problem. How can I make my plot connect the end of one line segment to the beginning of the next?
l = 0:.001:1.2;
SN1 = -150*(l(logical(S1)));
SN2 = -150*(l(logical(S2))) + 90;
SN3 = -150*(l(logical(S3))) + 180;
plot((l(logical(S1))), SN1, 'r')
hold on
plot((l(logical(S2))), SN2, 'r')
plot((l(logical(S3))), SN3, 'r')
  2 件のコメント
matlabuser
matlabuser 2020 年 4 月 25 日
plot((l(logical(S1))), SN1, 'r',(l(logical(S2))), SN2, 'r',(l(logical(S3))), SN3, 'r')
This is another way that I have plotted the functions. They are still disconnected in the same way, though. Hopefully this will help identify the problem in another way.
darova
darova 2020 年 4 月 25 日
編集済み: darova 2020 年 4 月 25 日
Try this madness
plot(l([S1 S2 S3]~=0),[SN1 SN2 SN3])

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

回答 (1 件)

Pravin Jagtap
Pravin Jagtap 2020 年 4 月 27 日
Hello,
I would recommend you to take a look at this question which deals with the similar issue of plotting shear force and bending moment diagram:
Hope, this will help you.

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by