plotting row by column vectors in matlab

To plot a column vector against a row vector, you can use the plot function in MATLAB.

Here's an example:

main.m
x = 1:5; % row vector
y = [2; 4; 6; 8; 10]; % column vector

plot(x, y)
72 chars
5 lines

This code will plot the values in y against the values in x. The semicolon in y is used to create a column vector instead of a row vector.

You can customize the plot by adding labels, changing the color or style of the line, adding a title, etc. For more information, you can refer to the MATLAB documentation on the plot function.

related categories

gistlibby LogSnag