Error: Brace indexing is not supported for variables of this type.
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sven Dietrich
am 30 Jul. 2020
Kommentiert: Sven Dietrich
am 30 Jul. 2020
Hi there,
I am trying to convert a cell into a vector, but I always get the error message: "Brace indexing is not supported for variables of this type."
% Datum korrigieren (date originally is a 14386x1 cell)
date(1,:)=[] ; % remove word
row1 = cell2mat(date(1,:)); % Start time
datenum= str2double(date);
datevec = cell2mat(datenum{:}); % cell to vector
% all elements - row1
The problem must be in line beginning with datevec
Brace indexing is not supported for variables of this type.
Error in location (line 18)
datevec = cell2mat(datenum{:}); % Umwandlung von Cell in Vector
How can I solve it?
And am I right that I can not substract an number from each element of a cell?
2 Kommentare
Sriram Tadavarty
am 30 Jul. 2020
The variable datenum is not a cell array and thus, the error. Can you provide the data mat file? Also, What is that you are trying to do?
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dates and Time 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!