Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

i have a .mat file as shown.the same data is used in different .mat files.but how it is generating variable val with diiferent sizes and different info?

조회 수: 1 (최근 30일)
function importfile2(fileToRead1)
%IMPORTFILE2(FILETOREAD1)
% Imports data from the specified file
% FILETOREAD1: file to read
% Auto-generated by MATLAB on 21-Apr-2014 10:21:10
% Import the file
newData1 = load('-mat', fileToRead1);
% Create new variables in the base workspace from those fields.
vars = fieldnames(newData1);
for i = 1:length(vars)
assignin('base', vars{i}, newData1.(vars{i}));
end
  댓글 수: 1
Walter Roberson
Walter Roberson 2014년 4월 21일
You can check to see how data is stored in the file by using "whos" with the "-file" argument.
for example,
whos -file MyMatFile.mat
Do that for two files for which you think that data should have the same size and same type.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by