MATLAB: How to draw a vertical line with a given height plotplotting I use line([1 1]*posx) to draw a vertical line in a figure. Can I also draw a vertical line with a specific height? Best Answer For a line from (x,y) to (x,y+height), Use this:line([x x], [y y+height]);From origin it could just beline([0 0], [0 height]); Related SolutionsMATLAB: How to drew vertical black line Use the line command.line([1,1],[0,2],'Color','k')draws a black line from (1,0) to (1,2), for example. MATLAB: How to increase figure window height plot(t,y)%the max you can do is set(gca,'position',[0 0 1 1]) Related QuestionHow to calculate eye area and heightHow to add a dashed horizontal line at 0 using plot functionHow to solve “Not Enough Input Arguments” error in a recursive functionHow to get only the width and height
Best Answer