Take number from excel in App Designer

1 回表示 (過去 30 日間)
Daniel
Daniel 2022 年 11 月 2 日
回答済み: Hiro Yoshino 2022 年 11 月 2 日
Hi, I want to load numbers from my excel, I first used readcell but it gives me this error:
I have this numbers, and I used xlsread, it works but only worked for the first 9 (all cells from C3 to C11), but when I try to read the others (C13 to C24) gives me the same error.
Theres a way to read numbers using readcell (or another option), and if I need to use xlsread, why the firsts works perfect but the next numbers no?

採用された回答

Hiro Yoshino
Hiro Yoshino 2022 年 11 月 2 日
readcell returns a "cell" value but not a double scalar. This is where you made a mistake.
Let me convert cell to double.
First, let's generate cell sample:
c = {1}
c = 1×1 cell array
{[1]}
and this can be converted to double as follows:
cmat = cell2mat(c)
cmat = 1
class(cmat)
ans = 'double'
The cmat is a double scalar and this is the data format that your components asks for.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by