Filter löschen
Filter löschen

Create variable in workspace

8 Ansichten (letzte 30 Tage)
Sadanand
Sadanand am 8 Jul. 2011
I am beginner in Matlab. I want to create variable and its value in matlab workspace through matlab script. I will call that function present in the script with parameters name and value. I want this name variable to be created in matlab workspace with value assigned to it. Parameters will be string and double array. Any help would be highly appreciated. Thanks.

Akzeptierte Antwort

Paulo Silva
Paulo Silva am 8 Jul. 2011
function MakeMyVar(VarName,VarValue)
assignin('base',VarName,VarValue)
end

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by