Borrar filtros
Borrar filtros

Matlab graphs not showing

1 visualización (últimos 30 días)
N/A
N/A el 11 de Abr. de 2019
Editada: N/A el 11 de Abr. de 2019
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')

Respuesta aceptada

Walter Roberson
Walter Roberson el 11 de Abr. de 2019
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 comentarios
N/A
N/A el 11 de Abr. de 2019
can you show me?
Walter Roberson
Walter Roberson el 11 de Abr. de 2019
p = interp1(yy1', initialize', 1/4, 'linear', 'extrap');

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Specifying Target for Graphics Output en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by