how to use this symbol in matlab?? ±

3 visualizaciones (últimos 30 días)
B.k Sumedha
B.k Sumedha el 2 de Jun. de 2015
Comentada: James Tursa el 2 de Jun. de 2015
I have a if loop where i need to check the condition.The loop is something like this:
if(tht(1)==thf(1))
S='Orginal Note';
disp(S);
else
S = 'Fake Note';
disp(S);
end
Inside that if loop i want to place that ±. How can i do this?? For example like:
if(tht(10)==thf(10±5))
How it can be done??

Respuesta aceptada

James Tursa
James Tursa el 2 de Jun. de 2015
Did you mean a simple test for two different values?
if( tht(10)==thf(10-5) || tht(10)==thf(10+5) )
  2 comentarios
B.k Sumedha
B.k Sumedha el 2 de Jun. de 2015
Cant it be used in just one situation both together.
James Tursa
James Tursa el 2 de Jun. de 2015
If you are asking if ± is an allowed operator in MATLAB, the answer is no.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB 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