problem with matlab 2009

2 visualizaciones (últimos 30 días)
Sabbas
Sabbas el 3 de Ag. de 2012
Comentada: mohammed rehman el 9 de Ag. de 2020
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

Respuesta aceptada

the cyclist
the cyclist el 3 de Ag. de 2012
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 comentario
mohammed rehman
mohammed rehman el 9 de Ag. de 2020
@the cyclist. Yes it works

Iniciar sesión para comentar.

Más respuestas (1)

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

Categorías

Más información sobre Numeric Types en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by