When you load the iris data, a variable called iris is created in the workspace.
I want to make it a variable and save some of the iris variables.
I tried to do this manually with ease or coding but I do not have enough coding skills to get help.
The point of the question is that you want to save some of the loaded data directly into a variable.
Thank you.
DataName='iris';
Data_Type = '.dat'; % .mat .dat
load (strcat(DataName,Data_Type))
if Data_Type == '.dat'
AllX=sprintf(strcat(DataName))
end

 채택된 답변

madhan ravi
madhan ravi 2019년 1월 9일
편집: madhan ravi 2019년 1월 9일
Variable=load(...) % call load with an output argument type doc load in command window for more explanation

댓글 수: 2

Oh, very simple.
Thank you
madhan ravi
madhan ravi 2019년 1월 9일
편집: madhan ravi 2019년 1월 9일
Anytime :) , make sure to accept the answer.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

태그

질문:

2019년 1월 9일

편집:

2019년 1월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by