problem with matlab 2009

2 ビュー (過去 30 日間)
Sabbas
Sabbas 2012 年 8 月 3 日
コメント済み: mohammed rehman 2020 年 8 月 9 日
Dear all,
I have the expression
[~,k] = ismember(raw6{ii,8}(1:2),{'MAT','FMI' });
IN matlab 2012 there is no problem when I run it.
IN matlab 2009 I get the following error message
Error: Expression or statement is incorrect--possibly unbalanced (, {, or
[.
thanks

採用された回答

the cyclist
the cyclist 2012 年 8 月 3 日
The syntax
[~,k]
with the tilde in the output, was introduced later. Replace that with
[dummy,k]
and it should work. (And you don't need to use "dummy", of course.)
  1 件のコメント
mohammed rehman
mohammed rehman 2020 年 8 月 9 日
@the cyclist. Yes it works

サインインしてコメントする。

その他の回答 (1 件)

Daniel Shub
Daniel Shub 2012 年 8 月 3 日
the ~ to ignore output arguments is a relatively new addition. Just replace ~ with temp. See my answer about problems with doing a global search.

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by