#161 itpp-3.99.3-1: itsave.m not supported by Matlab

release_3.99.x
closed
None
3
2012-09-15
2007-08-23
No

In development version 3.99.3-1 itsave.m only works using octave.

Matlab (V 7.3) issues:
1. Command "sizeof" not supported.
2. Command "imag" can not be used in boolean expression. Might be resolved using "isreal", which is also supported by octave.

/Andreas

Discussion

  • Adam Piątyszek

    Adam Piątyszek - 2007-08-23

    Logged In: YES
    user_id=1004597
    Originator: NO

    Hi Andreas,

    Thanks for your report. Could you prepare a patch, which fixes these two problems for Matlab and it still works in Octave? I do not have access to newer Matlab than v6.5, so I can not fix it by myself. Could you also check that itload.m works fine?

    Thanks in advance!
    /ediap

     
  • Andreas Wolfgang

    Logged In: YES
    user_id=1873808
    Originator: YES

    Hi,

    itload.m works fine and the attached patch (patch.itsave.m) solves the Matlab compatibility problem of itsave.m. The patch was tested on Matlab V7.3 and Octave V2.9.9.

    /Andreas
    File Added: patch.itsave.m

     
  • Andreas Wolfgang

    patch to reolve bug [1780012 ]

     
  • Adam Piątyszek

    Adam Piątyszek - 2007-08-24

    Logged In: YES
    user_id=1004597
    Originator: NO

    Hi Andreas,

    First of all welcome on board! And thanks for the patch. I thing that this is a good chance for your first commit to our SVN trunk repository. The patch needs a bit of refactoring before we can commit it to SVN, so I will give you some hints:

    1) The comment box with a description of the fixes shouldn't be included in the file. Instead, please add a new ChangeLog item using GNU-style formatting, e.g.:

    === cut ===

    2007-08-24 Andreas Wolfgang andreas-w@users.sourceforge.net

    * extras/itsave.m: Fixed to make script compatible with Matlab 7.3
    
    This path resolves the following issues:
    - sizeof() does not exist in Matlab - new function itsizeof()
    created
    - Matlab can not use matrices of different sizes in logical
    expressions
    - detection of a binary variable is made compatible with Matlab
    
    Patch tested with Matlab 7.3 and Octave 2.9.9
    

    === cut ===

    If you use Emacs or Vim as your editor, GNU Emacs has a nice ChangeLog editing mode. Vim as well.

    2) Please try to use the same indenting rules. In IT++ 2 space-indentation is a common rule

    3) If it is possible, filter out all trailing whitespace before committing the patch. This helps when diffing the changes in the file in future. It also reduce the number of possibilities for conflicts during merges. Vim/Emacs have ability to show and remove trailing whitespace automatically. Otherwise you can do it with sed/perl/awk/etc. afterwards, e.g.:
    % perl -pi -e 's/[ \t]+$//g' filename

     
  • Andreas Wolfgang

    Logged In: YES
    user_id=1873808
    Originator: YES

    Hi,

    the patch has been clean up and committed to the trunk repository.

    /Andreas

     
  • Adam Piątyszek

    Adam Piątyszek - 2007-08-24

    Logged In: YES
    user_id=1004597
    Originator: NO

    Thanks! This bug report will be closed with the next release (4.0.0-rc1).

    /ediap

    PS. Andreas: Please try to commit updated ChangeLog in the same commit as the code changes in the future. This makes the single commit more atomic and self explanatory.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks