Issues with comparing data read in form Excel (equals to)
이전 댓글 표시
Hello, this is my first post and hope someone can help.
I am writing a shot piece of code but I am coming up against a brick wall with an error.
Below is the code I have written.
%% Load txt file into Matlab
M = uigetfile('*.xlsx','Select the .xls-file'); % This get the file name only and puts it in M
[data,text] = xlsread(M); %data captures the "time" but converts it to number - test saves the rest
% M is the selected file that is read in
time = data*24;
% File now loaded into Matlab - Time not accurate but will still allow us
% to distinguish between one transmission bloak and the next
%% While loop -
d = ' ';
i = 1;
while d == ' '
i = i + 1; % i should equal 2 after first run
d = text(i,1); % row i, column 1 of the text read in
end
Below is the fail I am getting:
%??? Undefined function or method 'eq' for input arguments of type 'cell'.
%Error in ==> WAL_Analyser at 21
%end
I have tried different types of brackets, and spent hours trying different thing but couldnt find code that works.
Any questions let me know... the first few cells I would be looking at in the loop would be blank then when i = 6 I should receive text, and exit the loop. Thats what I had hoped anyway.
Thanks, Sean
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!