#55 Exception handling in itsave.m

open
nobody
itpp (51)
2
2014-08-24
2007-10-18
Zhu, Yan
No

I notice that current itsave.m only supports "bvec, bmat, ivec, imat, vec, mat, cvec, cmat". I happened to save a data with size 1X2X100 to an itfile. There is no error report when I run itsave.m . But when I try to itload the file. it causes some problems:

Here is a test code: (I use MATLAB7.1)

clear;
ExP_M = 1/2ones(2,50);
soft1_M = 1/2
ones(1,2,100);
itsave('debug.it', soft1_M, ExP_M);
save debug.mat;
clear;
itload('debug.it');
ExP_M

After running, you can not find ExP_M. This problem bother me pretty much time.

Therefore, I suggest to add some exceptions to prevent the user to save the type that is not supported by itsave.m at the first place.

Any opinion?

Best

Discussion

  • Logged In: YES
    user_id=1004597
    Originator: NO

    Hi!

    You are welcome to provide a patch that adds such a functionality to the itsave.m script.

    BR,
    /ediap