How I draw partial function?

10 ビュー (過去 30 日間)
Dilan Kilic
Dilan Kilic 2020 年 3 月 25 日
コメント済み: darova 2020 年 3 月 25 日
hi, everyone I want to plot partial function like these code:
clear,clc
x1=2:.01:6;
x2=4:.01:8;
y1=(2*(x1+1)-6)+(-2*(x2+1)+14);
y2=(2*(x1-1)-6)+(-2*(x2-1)+14);
x=[x1 x2];
y=[y1 y2];
x_line=0:.01:8;
y_line=0*x_line;
% h is assumed to be 4 and l is assumed to be 8.
figure(1)
plot(x,y,'r',x_line,y_line,'--k','linewidth',2)
axis([0 8 -6 6])
title('Initial Shape of f(x)')
xlabel('length')
ylabel('h')
I can create this
but, i cannot following
thanks a lot
  1 件のコメント
darova
darova 2020 年 3 月 25 日
what about impoly?

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by