MATLAB: How to plot in matlab from excel data excelplot hi all, I have three column in excel I want to plot them by using matlab, how could I plot them in MATLAB ?? please help.. Best Answer Try this:allData = xlsread(filename);column1 = allData(:, 1); % Extract column #1column2 = allData(:, 2); % Extract column #2column3 = allData(:, 3); % Extract column #3plot(column1, 'rd-', 'LineWidth', 2, 'MarkerSize', 8);hold on;plot(column2, 'go-', 'LineWidth', 2, 'MarkerSize', 8);plot(column3, 'b*-', 'LineWidth', 2, 'MarkerSize', 8); Related SolutionsMATLAB: Plot graph from array Assumning column 1 is x and column 2 is yplot(Class1(:, 1), Class1(:, 2), 'b*-', 'LineWidth', 2, 'MarkerSize', 10);grid on; MATLAB: Name a graph with the title of the sheets of excel Perhaps like this?xlfile = 'RamYPabHumedad.xlsx';[~, sheets] = xlsfinfo(xlfile); cmonths = 19;for i = 1:cmonths %iterate over the sheets Datenum = xlsread('RamYPabHumedad.xlsx',i); Ramiro = Datenum(:,1); Pablo = Datenum(:,2); Error1 = Ramiro-Pablo; shname = sheets{i}; % <---------------------- change here value = xlsread(xlfile, shname); figure; plot(Ramiro, Error1,'.r'); xlabel('Ramiro'); ylabel('Error'); title(sprintf('%s', shname));end Related QuestionSend plots from matlab script to UIAxes in AppdesignerData excel in matlabPlot – add legend individuallyCalc of mean and standard deviation
Best Answer