MATLAB: Append one graph to another appendgraphshold onplot Hi guys, How to append one graph to another? Tried using 'hold on' but it doesn't work. Thanks. Best Answer Use plotyy% Examplex=0:0.01:10y1=sin(x)y2=100*cos(x)plotyy(x,y1,x,y2) Related SolutionsMATLAB: Hold on is plotting strange lines to 0 when used for this code. Any ideas why gamma=1; alpha=0; beta=0; N=100; x0=50;xn=zeros(1,N); xn(1)=x0;realisations=1;for i=1:realisations hold on for j=1:N-1 pn = (((gamma*xn(j)*(1-alpha))+(N-xn(j))*beta)/(gamma*xn(j)*(1-alpha)+... (N-xn(j))*beta+(N-xn(j))*(1-beta)+gamma*xn(j)*alpha))*(xn(j)<=N); xn(j+1)=binornd(N,pn); end end plot(xn) axis([-10 N+10 -10 N+10]) MATLAB: Area, stairs % Random row inputx = 1:10;y = rand(1,10);% Normal area chartsubplot(3,1,1)area(x,y)% Stairs chart (non area)subplot(3,1,2)stairs(x,y)% Stairs areasubplot(3,1,3)x = [x;x];y = [y;y];area(x([2:end end]),y(1:end)) Related QuestionHow to create random marker indices in a loopHow to make a single plot with different colorsHow to create a plot with two y-axis such that the left axis has a linear scale and right axis has a log scale in MATLAB
Best Answer