MATLAB: How to plot a data points plotting hello there, i have 15 (x) points named x1 to x15; and corresponding to this i have 15 (y) points named from y1 to y15. how can i plot them ? Best Answer x = [x1, x2, x3, x4, x5, x6, x7, x8, x9]And do the same kind of thing for y1 etc. Thenplot(x, y) Related SolutionsMATLAB: Place array in a matrix Perhaps I'm misunderstanding but if x = [1.0000 0 0.5000 1.0000 0.5000 1.5000 0 -1.0000 -1.0000 1.0000 0.5000 -1.0000];which is a 6x2 array, then wouldn't x*x'be the desired 6x6 array? MATLAB: How to create many different plots, on different figures, quickly and neatly The first mistake was creating variable names like this: x, x2, x3. Such variable names make it extremely difficult to write compact code and are discouraged: https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval. It is better to create a cell array, and then you could easily use for-loop. For example, now you can do something like thisX = {x, x2, x3, x4, x5, x6, x7, x8, x9, x10};Y = {y, y2, y3, y4, y5, y6, y7, y8, y9, y10};for i = 1:numel(X) figure(i) plot(X{i}, Y{i})end Related QuestionGenerating sequences from data
Best Answer