Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

exportDAEtoMatlab function

exportDAEtoMatlab function

Hi,

I'm having trouble using the exportDAEtoMatlab function. If I run it as follows, there does not appear to be any output file:

exportDAEtoMatlab(MyModel, "mymodel.m")

Are my parameters correct? By the way, it's frustrating that I get no feedback from omc etc. about whether the function is even recognised (e.g. I don't get an error if try to run literally xyz99() as a function).

Re: exportDAEtoMatlab function

Did you run the getErrorString() command?

Re: exportDAEtoMatlab function

"Error: Class exportDAEtoMatlab not found in scope <global scope> (looking for a function or record)."

Re: exportDAEtoMatlab function

Hello ncafferkey

If you have load your Model with loadFile("MyModel.mo"), you have to use the command:

exportDAEtoMatlab(MyModel);

There is only one parameter to use.

Re: exportDAEtoMatlab function

Thanks. It works with one parameter. Ideally, however, I'd like the data to be in a CSV file. Is there an easy way to convert to such a format?

Re: exportDAEtoMatlab function

Also, one element of the matrix is not a constant. Instead, it is "{'if', sineVoltage.signalSource.startTime,' < ' {},{},}". Is this a bug, or does it mean that a constant can't be evaluated for that coordinate?

There are 0 guests and 0 other users also viewing this topic