Matlab - ignorar error

 
Vista:

ignorar error

Publicado por zauberberg (14 intervenciones) el 23/10/2007 14:51:40
Hola, mi problema es el siguiente, tengo que ir rellenando unos vectores, pero dentro del bucle for llega un momento en que una de ellas se sale de rango, es decir, el indice sobrepasa el tamaño de un vector. El resto ha de continuar igual por lo que me gustaria saber si hay un metodo de que se ignoren los mensajes de error del vector ya lleno.

Gra cias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:ignorar error

Publicado por fismat (391 intervenciones) el 23/10/2007 15:17:08
Hola zauberberg

Si deseas que no te muestren los mensajes de error tienes que colocar

warning off

al inicio de tu programa.

Saludos
Fismat

Te envio la documentacion
>> help warning

WARNING Display warning message.
WARNING('MSG') displays the text MSG like DISP except that it
can be suppressed.
WARNING OFF suppresses all subsequent warning messages.
WARNING ON displays all subsequent warning messages (without a
backtrace).
WARNING BACKTRACE is the same as WARNING ON except that the file
and line number that produced the warning is displayed.
WARNING DEBUG is the same as DBSTOP IF WARNING and triggers the
debugger when a warning is encountered.

WARNING ONCE displays Handle Graphics backwards compatibility warnings
only once per session.
WARNING ALWAYS displays Handle Graphics backwards compatibility
warnings as they are encountered (subject to the current warning
state).

S = WARNING(ARG) sets the warning state if ARG is one of the
warning states: ON, OFF, BACKTRACE or DEBUG and returns the previous
warning state in S as a string.

If ARG is a string that is not one of the warning states, then the
warning message is set to ARG and the previous warning message string
is returned in S.

[S,F] = WARNING returns the current warning state S and the current
warning frequency F as strings.

See also LASTWARN, DISP, ERROR, ERRORDLG, DBSTOP.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:ignorar error

Publicado por zauberberg (14 intervenciones) el 23/10/2007 16:26:05
Gracias, pero con esta solucion el programa continuará con su ejecución?. cuando intente acceder a una posicion inexistente de un vector el programa se detiene. ¿En este caso no será asi?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar