Are there any functionality issues for tall arrays with Matlab version 2016b?

5 ビュー (過去 30 日間)
Birtan Derin
Birtan Derin 2018 年 6 月 8 日
回答済み: Jayanti 2025 年 4 月 1 日
I'm having a lot of trouble trying to work with tall arrays. There aren't a lot of resources out there, but I'm having issues with even the most basic functions. For instance,
>> x = find(~tt.YTW);
Undefined function 'find' for input arguments of type 'tall'.
On top of everything spreadsheetDatastore doesn't have any property on how to treat missing values. It brings in missing values as NaN, and if my variable of interest is of type double, NaN values create problems trying to convert the variables. Specifically:
Error using tall/gather (line 50)
Internal problem while evaluating tall expression. The problem was:
Unable to convert variable 'YTW' in sheet 'Sheet1' in file 'J:\Fixed _Inc\Internal\birtanderin\MS
Data\25-35\Book1.xlsx' to type 'double'.
I tried lots of different things but nothing seems to work. So, maybe the problem is with Matlab2016b? Please help.

回答 (1 件)

Jayanti
Jayanti 2025 年 4 月 1 日
Hi Birtan,
In MATLAB 2024a, you can handle missing values in a "spreadsheetDatastore" by using the "fillmissing" function. If your variable contains NANs, you can replace them with a specific value such as 0.
The following line of code demonstrates this:
ds = spreadsheetDatastore("your_file");
tt = tall(ds);
tt.YTW = fillmissing(tt.YTW, 'constant', 0);
Please refer the following documentation link on “fillmissing” for more details:

カテゴリ

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

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by