Extracting data from excel file; Adding a new column; plotting the first and the newly added column
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ali Awada
il 16 Ott 2020
Commentato: Ameer Hamza
il 16 Ott 2020
Hello,
Can someone please help with the following code:
I need to import data from an excel file(9600x2). Then i need to add a new column such that the new column is equal to the value in the second column minus the mean of the entire second column.
At the end i want to plot the 3rd column values versus the 1st column values.
Thank you in advance
0 Commenti
Risposta accettata
Ameer Hamza
il 16 Ott 2020
Something like this
M = readmatrix('sample.xlsx');
M = [M, M(:,2)-mean(M(:,2))];
plot(M(:,1), M(:,3))
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!