assign variable name to Function Output Variables

2 vues (au cours des 30 derniers jours)
Adrian
Adrian le 8 Nov 2019
Commenté : Guillaume le 8 Nov 2019
Hi All
when using a Function it is possible to assign a variable name to the input
e.g
wave = Uph
[.........] = waveform(wave)
Is it possible to use the same variable in the output definition
[wave_rms]=waveform(wave)
so the output variable stored in the workspace is Uph_rms and not wave_rms?
Thanks
Adrian

Réponses (1)

M
M le 8 Nov 2019
Why don't you just change [wave_rms]=waveform(wave) into [Uph_rms]=waveform(wave) ?
  5 commentaires
Adrian
Adrian le 8 Nov 2019
They are 20 different variables
Guillaume
Guillaume le 8 Nov 2019
They are 20 different variables
That's where you went wrong and what we have to fix. How were these 20 different variables created in the first place.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by