MATLAB: How do i plot a column matrix as a vector point on the x-y plane inm matlab MATLABthe code i am trying to plot a matrix as a set of vector points i am quiet not getting it can anyone help Best Answer Let x be your vector...use plot(x,'.r')x = rand(10,1) ;plot(x,'.r') Related SolutionsMATLAB: How to use text as tick marks in x-axis in a plot Here is one way:% Some pretend dataN = 10;x = sort(2*rand(N,1));y = sort(2*rand(N,1));% Plot the figurefigureplot(x,y)% Define the tick locations, and label themset(gca,'XTick',0.5:0.5:2)set(gca,'XTickLabel',{'\beta=0.5','\beta=1.0','\beta=1.5','\beta=2.0'})That is pretty manual. If you need it to be more automatic, you'll need to get the values of the x-ticks, and then use that vector of values to create the labels. MATLAB: How can i fix the error ‘Index exceeds the number of array elements (51)’ You need to apply elementwise division:x = [0:0.1:5];y = sin(x)./x;plot(x, y), xlabel('xi'), ylabel('Theta'), title('Solution to Lane Emden Equation'),grid on, axis equal;ax = gca; ylabel = texlabel(y); xlabel = texlabel(x); ax.XAxisLocation = 'origin'ax.YAxisLocation = 'origin' Related QuestionRemove certain ticks on y-axis when plottingDroplet plotting on x-y plane
Best Answer