Having issues with plotting and supposedly there is a size problem?
Mostrar comentarios más antiguos
So here is my code in plotting a graph.
x = linspace(-1,1);
y1 = 0.5 .* sin(sin(12.*x));
yyaxis left
plot(x,y1,'r-');
ylim([-.5,.5])
y2 = 15 .* (exp((2.*x)./5)) ;
yyaxis right
plot(x,y2,'b--');
ylim([10,24])
yyaxis left
title('Plots with different y axes')
xticks([-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1])
xlabel('x')
ylabel('y1')
yyaxis right
ylabel('y2')
But, supposedly variable x must be of [1 200] whatever that means however it is of size [1 100]. I am told that the number of points of vector x is wrong and I need to check the linspace. I dont understand the instructions given and if possible could someone help me clarify?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
