Subscripting into an mxArray is not supported. Cell contents reference from a non-cell array object.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a Simulink model, there is a MATLAB function CodeBlockSegment. In this function I call the lteCodeBlockSegment function (from LTE Toolbox), which returns the result as a cell array with int8 column vector elements (the size of the vectors changes depending on the input data). I need to get separately each vector that is a subset of the cell array.
I have already tried all possible solutions to the problem from the Internet, but I constantly get various errors. That being said, the same code runs well in a simple matlab .m file.
function segm = CodeBlockSegment(in,num)
coder.extrinsic('lteCodeBlockSegment','cell2mat','cell2table');
cbs1 = lteCodeBlockSegment(in);
tf = iscell(cbs1);%result - 1 ( returns 1 (true) if A is a cell array. Otherwise, it returns 0 (false).)
segm=cbs1{1}; %Cell contents reference from a non-cell array object.
%d = cell2mat(cbs1);
%segm=d(1,1); %Subscripting into an mxArray is not supported.
0 Kommentare
Antworten (1)
Suman
am 27 Sep. 2024
The error "Cell contents reference from a non-cell array object." means that the variable "cbs1" is not a cell array. Try using parentheses instead, "cbs1(1)".
0 Kommentare
Siehe auch
Kategorien
Mehr zu LTE Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!