How do I resolve 'Conversion to cell from double is not possible'?

I have this code creating a 1x3 cell array of 4x16 matrices. Then If a check box is ticked, the corresponding 4x16 zeros matrices are replaced with 4x16 matrices called from excel.
for num=1:3
rates{num} = zeros(4,16);
end
if app.Type1_Select.Value == 1
rates(1,1) = xlsread('Rates.xlsx','C3:R6');
end
When I run this code an error comes up saying 'Conversion to cell from double is not possible.' for line 5.
How can I resolve this?
Thank you

 Accepted Answer

Ashton - try replacing the () brackets with {} braces
if app.Type1_Select.Value == 1
rates{1,1} = xlsread('Rates.xlsx','C3:R6');
end

More Answers (0)

Products

Release

R2019a

Community Treasure Hunt

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

Start Hunting!