필터 지우기
필터 지우기

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 CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by