'Conversion to double from cell is not possible.'
显示 更早的评论
Problem: I have this code that calculate postfix but when I use it gives me an error.
Postfix(nCols)=struct('matches',[],'postfix',[]);
for k=1:nCols
for l=1:25
% Calcolo postfissi associati alle traiettorie dei singoli utenti
if ~isempty(semanticTrajCompact(1,k).TrajCompact)
[Postfix(1,k).matches(:,l), Postfix(1,k).postfix(:,l)] = regexp(semanticTrajCompact(1,k).TrajCompact,sprintf('%d%d(.*)',digits{1}(l),digits{2}(l)),'match','once','tokens');
end
end
end
The error is:
'Conversion to double from cell is not possible.'
Can you give me some suggestions to solve it?
4 个评论
Walter Roberson
2015-12-16
Try
Postfix(nCols)=struct('matches',[],'postfix',{});
ely may
2015-12-17
Walter Roberson
2015-12-17
Try
Postfix(nCols) = struct('matches',[],'postfix',{{}});
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!