Borrar filtros
Borrar filtros

Remove warning message

12 visualizaciones (últimos 30 días)
Pedro Cavaco
Pedro Cavaco el 27 de Sept. de 2011
Dear Matlab folks,
When I save data from matlab to new excel spreadsheet, I get the following message:
Warning: Added specified worksheet.
In xlswrite>activate_sheet at 265
In xlswrite at 221
In export_2_excel at 94
In Model_Main at 409
Is there a way to hide this message? Because now it's appearing on the command window every time a new sheet is created and is very annoying.
Regards,
Pedro Cavaco

Respuesta aceptada

Wayne King
Wayne King el 27 de Sept. de 2011
Yes, you can use.
warning('OFF', 'MSGID')
Use lastwarn() to get the message ID for the warning you want to turn off.
  3 comentarios
Wayne King
Wayne King el 27 de Sept. de 2011
No, I mean right after you get that warning in the command window, enter
[lastmsg,lastid] = lastwarn;
Then use the lastid (a character array)
warning('off',lastid)
Of course you can always do
warning('off','whateverthesringisinlastid')
Pedro Cavaco
Pedro Cavaco el 27 de Sept. de 2011
Thanks a lot Wayne.
Works great!

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by