Borrar filtros
Borrar filtros

what's wrong here?

2 visualizaciones (últimos 30 días)
Monali
Monali el 11 de En. de 2015
Comentada: Monali el 28 de Feb. de 2015
gamma1(i)=gamma(i-1)*lambda*epf(i-1)/epf(i)
here the error showing is that
" Invalid syntax at'='. Possibly a ),},or ] is missing"
rectify what is the mistake here and how to correct it?

Respuesta aceptada

Image Analyst
Image Analyst el 11 de En. de 2015
There is nothing wrong with that code. Please tell us the entire error message, not a small part of it like you did. What you showed is not a MATLAB error message. How do I know? Well it doesn't have line numbers or function names for one thing. Also tell us the value of i when it errors. With syntax errors, it's possible that the error actually starts on the line before what it says.
  12 comentarios
Image Analyst
Image Analyst el 11 de En. de 2015
Wow, third error that you're trying to fix via back and forth forum messages. It's really time for you to read this: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/ so that you can solve problems yourself much, much faster than asking us.
Monali
Monali el 28 de Feb. de 2015
Thank you

Iniciar sesión para comentar.

Más respuestas (1)

John D'Errico
John D'Errico el 11 de En. de 2015
Editada: John D'Errico el 11 de En. de 2015
There is absolutely NOTHING wrong with THAT line of code. However...
This kind of error usually indicates you might find an error in a previous line. This is my guess. You have gotten the parser, let me say, confused. It thinks it sees an error in that line, but you are missing a paren or bracket in one of the lines that came before. So when that bracket was missing, it thinks the line was continued onto the next line or so. Then it sees something it cannot understand in context of a continued line, so it gets upset. But it reports an error on the wrong line!
Yes, I know this is sort of a feature. Hey, some would call it a bug. Once you learn what is happening when you see an error like that, you know what to look for, and WHERE to look.

Categorías

Más información sobre Simulink 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