Switching off warning "load: 'file' found by searching load path

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Switching off warning "load: 'file' found by searching load path

Avinoam
>> load ('penny.mat')
warning: load: 'C:\Octave\OCTAVE~1.1\share\octave\4.2.1\data\penny.mat' found by searching load path

I would like to switch off this warning:

>> warning ('off', 'Octave:load-file-in-path')
>> warning ('query', 'Octave:load-file-in-path')
ans =

  scalar structure containing the fields:

    identifier = Octave:load-file-in-path
    state = off

but still:

>> load ('penny.mat')
warning: load: 'C:\Octave\OCTAVE~1.1\share\octave\4.2.1\data\penny.mat' found by searching load path

but using
>> warning ('off', 'all')

switches off this warning.
How do I switch off only this warning?

Thanks,

Avinoam
Reply | Threaded
Open this post in threaded view
|

Re: Switching off warning "load: 'file' found by searching load path

mmuetzel
Avinoam,

you can query the id of the last warning with the following:
>> load ('penny.mat')
warning: load: 'C:\Octave\OCTAVE~1.1\share\octave\4.2.1\data\penny.mat' found by searching load path
>> [w, id] = lastwarn
w = load: 'C:\Octave\OCTAVE~1.1\share\octave\4.2.1\data\penny.mat' found by searching load path
id = Octave:data-file-in-path

Issuing the following command disables the warning for me:
warning ('off', 'Octave:data-file-in-path')

Markus
Reply | Threaded
Open this post in threaded view
|

Re: Switching off warning "load: 'file' found by searching load path

Avinoam
Thank you very much, Markus

Avinoam