How to use default values with deal()?
Afficher commentaires plus anciens
I use the fallowing method in a function to assign parameter values:
parameters = [1,2,3];
temp_param = num2cell(parameters);
[p1,p2,p3] = deal(temp_param{:});
It is possible to use default values somehow (with a simple compressed syntax)?
So if parameters = [1,2] I still want to use [p1,p2,p3] = ... but let p3=0 by default.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink 3D Animation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!