Effacer les filtres
Effacer les filtres

Create variable in workspace

8 vues (au cours des 30 derniers jours)
Sadanand
Sadanand le 8 Juil 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.

Réponse acceptée

Paulo Silva
Paulo Silva le 8 Juil 2011
function MakeMyVar(VarName,VarValue)
assignin('base',VarName,VarValue)
end
  1 commentaire
Sadanand
Sadanand le 8 Juil 2011
Thnx bro..

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by