Effacer les filtres
Effacer les filtres

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

16 vues (au cours des 30 derniers jours)
Ashton Linney
Ashton Linney le 7 Avr 2020
Commenté : Ashton Linney le 7 Avr 2020
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

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by