필터 지우기
필터 지우기

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 CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by