Getting a subfunction to return a value as a logical

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

 採用された回答

D
D 2011 年 11 月 5 日

0 投票

Ok, silly mistake, easy fix.
m = logical(m)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePerformance and Memory についてさらに検索

質問済み:

D
D
2011 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by