MATLAB: How to plot a data set with shift in axis MATLABplot Hi, I am trying to plot two data set in a figure Y1 starts from x=1 to x=100 but Y2 starts from x=50 to 100. How can I plot Y2 from 50 (with a shift of 50 values)? Thanks Best Answer closex1=1:100y1=sin(0.1*x1);x2=50:100;y2=cos(.2*x2)plot(x1,y1);hold allplot(x2,y2) Related SolutionsMATLAB: Dumthe y axis This is what I wanted, check this file.Plot two axes - File Exchange.https://uk.mathworks.com/matlabcentral/fileexchange/7426-plot2axesLet me know if there is a cleaner native matlab way of doing this.Best RegardsSamir MATLAB: Interpolation in negative axis Once you have your fitted āpā values, you can find the x value at y=0 with the fzero function.Try this:fun1 = @(p,xdata) p(1).*(1-exp(-xdata./p(2)))+5000;x_intercept = fzero(@(xdata) fun1(p,xdata), -1); Related QuestionPlotting loops, but only empty plotHow to nondimensionalized plot axisHow to shift the time series in y axis
Best Answer