Getting a subfunction to return a value as a logical

6 vues (au cours des 30 derniers jours)
D
D le 5 Nov 2011
My sub-function is called from my main function as such...
[m,n] = funk(a,b)
I need m to return as a logical not a double. At the end of the sub-function I use logical(m), but it still returns as a double in the main function. how do I get it to return into the main function as a logical? Thanks

Réponse acceptée

D
D le 5 Nov 2011
Ok, silly mistake, easy fix.
m = logical(m)

Plus de réponses (0)

Catégories

En savoir plus sur Performance and Memory 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