How to plot cell datatype in MATLAB
Show older comments
Hello!
I am here importing data from an Excel file in my workspace. I used readtable command and later convert it into array by using str2array and as a result of this I get cell datatype which has all the correct values. the Excel file contain four variables; Date,Wind speed, Wind angle, Wind power. I also used xlsread function but the output is only 1D array and the remaining arrays were ignored by MATLAB.
data=readtable('sotavento.xlsx');
data=str2array(data);
now, I made a separate 1D array for each variables so that it can be plotted against each other to check the correlation between the given variables.
speed=data(5:end,2); % first 4 points are empty so we discarded.
date=data(5:end,1);
The problem is that I can't plot cell datatype like the way we can plot double etc.
(Note:- the dataset in Excel file may look abnormal as it is quite messy but we are working on it, the main concern is cell datatype plot)
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
