OMNeT++/OMNEST Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000550OMNeT++IDE / result analysispublic2012-03-10 21:382012-03-13 15:08
Reporterjlizquierdo 
Assigned Torhornig 
PrioritynormalSeveritytrivialReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.2.1 
Target VersionFixed in Version4.2.2 
Summary0000550: Error in export as matlab script
DescriptionWhen you export a vector from result analysis feature to a matlab script and then import it in matlab an error is thrown:

Error: File: exportError.m Line: 1 Column: 26
The input character is not valid in MATLAB statements or expressions.

The content of exportError.m is:

measured_RTT.description=""
measured_RTT.X=[
0.112496266666;
0.172247733332;

...

589.240920444581;
589.486536444581;
]

measured_RTT.Y=[
0.059789066666;
0.0597514666660000013;

...

0.239904000000000006;
0.245616000000000001;
]


The point is Matlab uses single quotes for strings instead of double quotes:

measured_RTT.description="" must be measured_RTT.description=''
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0000726)
jlizquierdo (reporter)
2012-03-10 22:14

It seems the problem is on src/scave/export.cc:

string MatlabStructExport::quoteString(const string &str)
{
    string result;
    result.push_back('"'); // <-- here
    for (string::const_iterator it = str.begin(); it != str.end(); ++it)
    {
        if (*it == '\\' || *it == '\"')
            result.push_back('\\');
        result.push_back(*it);
    }
    result.push_back('"'); // <-- and here

    return result;
}
(0000731)
rhornig (administrator)
2012-03-12 14:20

Fixed the quotation mark. changed from " to '. Also escaping was wrong ' is quoted as '' not as \'
(0000739)
rhornig (administrator)
2012-03-13 15:08
edited on: 2012-03-14 22:32

After some investigation, we have removed the matlab script output from the IDE, as it was broken.

CSV files can be used to import data to matlab.


- Issue History
Date Modified Username Field Change
2012-03-10 21:38 jlizquierdo New Issue
2012-03-10 22:14 jlizquierdo Note Added: 0000726
2012-03-12 14:20 rhornig Note Added: 0000731
2012-03-12 14:20 rhornig Status new => resolved
2012-03-12 14:20 rhornig Fixed in Version => 4.2.2
2012-03-12 14:20 rhornig Resolution open => fixed
2012-03-12 14:20 rhornig Assigned To => rhornig
2012-03-13 15:08 rhornig Note Added: 0000739
2012-03-14 22:32 andras Note Edited: 0000739


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker