필터 지우기
필터 지우기

how to use workspace data and run the matlab ?

조회 수: 2 (최근 30일)
Aniket
Aniket 2013년 3월 14일
Hello I have mat file which contains data and i have written a matlab script.
for example
a= [1.021 -685.1 0 0;1 -0.5 0.02222 0;0.4228 0 -1.111 -0.4444;0.4228 0 01.556]
b=[140.2 0; 0 0; 0 1;0 1];
c=[9.55 0 0.2122 0; 0 0 0 0.4444];
d=zeros(2);
this is my inputs in the code but i have another *.mat file which contain data about a,b,c,d and i want to use this data and run the script.
how should i do this ?
  댓글 수: 1
Jan
Jan 2013년 3월 14일
Please use meaningful tags. All questions in this forum concern "Matlab". Thanks.

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2013년 3월 14일
편집: Jan 2013년 3월 14일
Do not import the variables directly, because overwriting locally existing variables can cause errors, but store the output of load in a struct:
DataFromFile = load('YourFile.mat');
perhaps = a - DatafromFile.a

추가 답변 (1개)

B
B 2013년 3월 14일
you can save your data, then use load when you need them
  댓글 수: 1
Aniket
Aniket 2013년 3월 14일
actually i have a data file which contains data and use this file data for my matlab script how should i use this ?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by