Matlab graphs not showing

1 回表示 (過去 30 日間)
N/A
N/A 2019 年 4 月 11 日
編集済み: N/A 2019 年 4 月 11 日
clear all ;
close all;
f=@(x,y1,y2) y2;
g=@(x,y1,y2) 1/4*y1-8;
%shooting method inntialization
initialize=[-5:.05:0];
%plot the solution
figure
title('shooting method')
xlabel('t')
ylabel('y(t)')
plot(x,y1)
hold on
% make your second plot
figure
(plot(x,1./(4*x-8)'))
legend('numerical solution','exact solution')

採用された回答

Walter Roberson
Walter Roberson 2019 年 4 月 11 日
You do not have "hold on" in effect, and you are not selecting axes so that the plots are directed to different parts of the figure. Your second plot is replacing the first plot. You should use hold on after the first plot
  4 件のコメント
N/A
N/A 2019 年 4 月 11 日
can you show me?
Walter Roberson
Walter Roberson 2019 年 4 月 11 日
p = interp1(yy1', initialize', 1/4, 'linear', 'extrap');

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTwo y-axis についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by