abs function not working in matlab while reading table and cell array

12 ビュー (過去 30 日間)
Krishnapriya
Krishnapriya 2023 年 2 月 20 日
コメント済み: Krishnapriya 2023 年 2 月 20 日
I have been trying to plot ecg data and to normalise it i need to find the absolute data .
But I am getting errors.
Kindly help me.
I tried coverting it to mat file and do it too.
still not working .
It is a signal of length 2222.
  2 件のコメント
Stephen23
Stephen23 2023 年 2 月 20 日
If your data are purely numeric then use READMATRIX.
Otherwise use curly-braces to access the content of a table (not parentheses):
Krishnapriya
Krishnapriya 2023 年 2 月 20 日
Thank you

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

採用された回答

Askic V
Askic V 2023 年 2 月 20 日
Please have a look at this:
help table2array
TABLE2ARRAY Convert table to a homogeneous array. A = TABLE2ARRAY(T) converts the table T to an array A whose type depends on the data in T. All variables in T must have sizes and types that are compatible for horizontal concatenation. If T is an M-by-N table with variables that each have one column, then each variable becomes one column in A. Variables in T that have more than one column become multiple columns in A, and A has L = SUM(TABLEFUN(@(V)SIZE(V,2),T) columns. Variables in T may have different numbers of columns. Variables in T may be N-D, but all must have the same size in dimensions higher than 2. A is N-D in this case. NOTE: TABLE2ARRAY horizontally concatenates the variables in T to create A. If the variables in T are cell arrays, TABLE2ARRAY does not concatenate their contents -- A is in this case a cell array, equivalent to TABLE2CELL(T). To create an array containing the contents of variables that are all cell arrays, use CELL2MAT(TABLE2CELL(T)). TABLE2ARRAY(T) is equivalent to T{:,:}. See also ARRAY2TABLE, TABLE2CELL, TABLE2STRUCT, TABLE. Documentation for table2array doc table2array Other uses of table2array codistributed/table2array tall/table2array
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 2 月 20 日
see also readmatrix for new enough matlab
Krishnapriya
Krishnapriya 2023 年 2 月 20 日
Thank you,it got sorted out when i called it using d.var2 name instead of directly referring to the column.
Thank You for taking out time to help me.
Regards
Krishnapriya

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by