フィルターのクリア

Can't retrieve data from .mat file

2 ビュー (過去 30 日間)
Craig Johnson
Craig Johnson 2022 年 7 月 31 日
コメント済み: Craig Johnson 2022 年 7 月 31 日
Code:
input=load('MetData.mat')
output:
input =
struct with fields:
T: [5×10 double]
p: [5×10 double]
How can I extract the arrays and not just the dimensions of the arrays?
  1 件のコメント
Craig Johnson
Craig Johnson 2022 年 7 月 31 日
I also tried:
temperature=load(MetData.mat,T)
pressure=load(MetData.mat,p)

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

採用された回答

Walter Roberson
Walter Roberson 2022 年 7 月 31 日
temperature = input.t;
pressure = input.p;
Note that we recommend against using "input" as the name of a variable, as it gets confused with the input() function
  2 件のコメント
Craig Johnson
Craig Johnson 2022 年 7 月 31 日
I'm still getting the same output when using:
measurements=load('MetData.mat')
temperature = measurements.T;
pressure = measurements.p;
(also took your advice and renamed the variable)
Craig Johnson
Craig Johnson 2022 年 7 月 31 日
i forgot about the semicolon suppression thanks so much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by