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 日

0 投票

Variable=load(...) % call load with an output argument type doc load in command window for more explanation

2 件のコメント

jeheon park
jeheon park 2019 年 1 月 9 日
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 ExchangeMATLAB についてさらに検索

製品

タグ

質問済み:

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