why do i receive "Unable to perform assignment because brace indexing is not supported for variables of this type".
3 次查看(过去 30 天)
显示 更早的评论
dear matlab community, i try to get the dmos value with 982x2 where the column 1 is the size of image and the second collumn 2 is for the dmos value but there is a problem with coding. can see the attach file. i appreciate all your help. thank you
0 个评论
回答(1 个)
Voss
2023-5-27
Brace indexing (using {}) is for cell arrays (or tables), but FYPdatabase is a numeric array, so that's why the error happens.
Here's how you can make FYPdatabase a cell array, with first column being image size and second column being the corresponding element of dmos, as specified in your question:
load('dmos.mat');
FYPdatabase = cell(numel(dmos),2); % preallocate a cell array with 2 columns and numel(dmos) rows
FYPdatabase(:,2) = num2cell(dmos); % place the dmos values in the 2nd column
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!