Undefined function 'ne' for input arguments of type 'table'.

12 ビュー (過去 30 日間)
Alexandra Philip
Alexandra Philip 2020 年 8 月 12 日
コメント済み: Alexandra Philip 2020 年 8 月 12 日
I am having some trouble with updating a table as I first am extracting date from the 8th column, then I try to find data within that column that don't equal "". Such as:
columnData=CopyofEGIYieldDataJuly202073020(2056:2098,:)
Folderlinks=columnData(:,8)
% Fstr=string(Folderlinks)
Filefolder=find(Folderlinks~="")
EGIdataMike=columnData(Filefolder,:)
But this results in
Undefined function 'ne' for input arguments of type 'table'.
Error in Untitled4 (line 8)
Filefolder=find(Folderlinks~="")
I'm trying to get the data to where it is not just the "" like this:
into a new table with the same columns. So it would then cut down the number of rows as I want to look at the dat where in that column it is not just "".
Any suggestions or application of corrections?

採用された回答

Steven Lord
Steven Lord 2020 年 8 月 12 日
If you want the data as a smaller table, index into the larger table with parentheses.
Folderlinks=columnData(:,8) % Folderlinks is a table array
If you want the data as a string array (pulling the data out of its table container) index into the larger table with curly braces.
FolderlinksString = columnData{:, 8} % FolderlinksString is a string array
The not-equal operator ~= is defined for string arrays but not for table arrays.
  1 件のコメント
Alexandra Philip
Alexandra Philip 2020 年 8 月 12 日
Thank you. The code works now.

サインインしてコメントする。

その他の回答 (1 件)

Bruno Luong
Bruno Luong 2020 年 8 月 12 日
Filefolder = find(table2array(Folderlinks)~="")

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by