Workspace variables into functions

Version 1.0.0.0 (1,36 ko) par Mert
Reading multiple variables into a function and saving those variables in a loop
209 téléchargements
Mise à jour 14 juil. 2011

Afficher la licence

Problem definition:

This code is to help beginners to understand how reading multiple variables into a function and storing them within a loop without using 'eval' function. This is more of a tutorial code than a specific one.

I have multiple variables (X1,X2,X3,...,X10) stored in a mat file, i.e. WS1.mat, which to be read into a function i.e. myfunc and after the expressions are calculated, I want
to store them in seperate variables, (A1,A2,A3,...,A10). I want those variables to be %stored in 'base' workspace, instead of 'function' workspace

Citation pour cette source

Mert (2026). Workspace variables into functions (https://fr.mathworks.com/matlabcentral/fileexchange/32224-workspace-variables-into-functions), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Programming dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0