MATLAB: Using Subplot in matlab not scalar operationssubplotvector operations I couldn't figure how to solve that ! can anyone help me understand it ? Best Answer Try this:x = linspace(1, 10, 500);y = sin(x) ./ x;subplot(2, 2, 1);plot(x, y, 'b-', 'LineWidth', 2);grid on;subplot(2, 2, 2);y = .....plot(....etc.subplot(2, 2, 3);% code to compute the third ysubplot(2, 2, 4);% code....Since x is a vector make sure you use ./, .*, and .^ rather than the non-dotted versions /, *, and ^. Related SolutionsMATLAB: SUBPLOT : UPPER & LOWER PLOT %truefor i = 1: 6 subplot(6,2,i) y = cos(i*x); plot(x,y) title(sprintf('y = cos(%dx)', i));end MATLAB: Subplots made by multiple plots Each subplot needs to be held individually.figure; hold onsubplot(121)hold onplot(1:3)plot(rand(1,3))subplot(122)hold onplot(4:6)plot(rand(1,3)) Related QuestionMatlab subplotHow to make mesh plot and contour plot.
Best Answer