How to plot cell datatype in MATLAB
显示 更早的评论
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)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

