Borrar filtros
Borrar filtros

why do i receive "Unable to perform assignment because brace indexing is not supported for variables of this type".

4 visualizaciones (últimos 30 días)
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

Respuestas (1)

Voss
Voss el 27 de Mayo de 2023
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

Productos


Versión

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by