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

15 views (last 30 days)
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

Geoff Hayes
Geoff Hayes on 7 Apr 2020
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)

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!