how to open .mat file in matlab?
이전 댓글 표시
Hello,
I am tring to open Yeast.mat in matlab , but it does not work.
I got an error (Not enough input arguments.Error in importfile1 (line 9) newData1 =load('NotreDame_yeast.mat', fileToRead1);
function importfile1(fileToRead1)
%IMPORTFILE1(FILETOREAD1)
% Imports data from the specified file
% FILETOREAD1: file to read
% Auto-generated by MATLAB on 16-Sep-2019 02:26:56
% Import the file
newData1 = load('NotreDame_yeast.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
Ahmed
2021년 1월 26일
Try to save the mat file in the same directory of your code
채택된 답변
추가 답변 (1개)
Sebastian Körner
2019년 9월 16일
Not sure what "fileToRead1" is, but per definition it should be the variable you want to load from your file
if you want to load the hole file try:
newData1 = load('NotreDame_yeast.mat');
댓글 수: 2
Sebastian Körner
2019년 9월 16일
you can check the different syntax types of load here:
Omar B.
2019년 9월 16일
카테고리
도움말 센터 및 File Exchange에서 Design and Simulate SerDes Systems에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!