Plotting data excel into matlab
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two column in excel I want to plot them by using matlab, lets say I have first column from B2-B702 and second column from C2-C702. Column B is a number (age) while column C is string (tamoxifen / none treatment). I want to plot the age range data based on tamoxifen treatment or not and see the amount of patient based on the age range. How could I plot them in MATLAB ?? please help..
0 Kommentare
Akzeptierte Antwort
Guru
am 4 Jul. 2013
Read in the data into matlab using xlsread, then plot them once they are read into the MATLAB workspace
doc xlsread
doc plot
5 Kommentare
Guru
am 5 Jul. 2013
Either one, generally people don't like to change the raw data itself, excel in this case. So something along the lines of
y = strrep(y,'YES','1')
y = strrep(y,'NO','0')
y = str2double(y)
This would convert all instances of NO to 0, and all instance of YES to 1 so you can then plot it
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!