Hi Constantinos,
Yes. You can simply replace line 552 (persistent nsc_opt;) with …
nsc_opt = [];
This is some caching that was added to speed things up when running lots of
small problems. Making the change above will revert the performance for such
cases to be similar to MATPOWER 5.1.
Ray
> On Jun 13, 2016, at 5:08 PM, Constantinos Heracleous <[email protected]>
> wrote:
>
> Hi, thanks for the quick reply!
>
> I already tried this and unfortunately is not working.
> is there any way to remove the persistent from nsc_opt? matlab is giving also
> a warning in the code saying "Line 551: PERSISTENT could be very inefficient
> unless it is a top-level statement in its function."
>
> Constantinos.
>
>
>
>> On 13 Jun 2016, at 11:35 PM, Ray Zimmerman <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> I’ve not tried it myself, but you might try executing the following command
>> at the top-level of your callback function:
>>
>> persistent nsc_opt;
>>
>> I have no idea if it will work.
>>
>> Ray
>>
>>
>>
>>> On Jun 13, 2016, at 12:22 PM, Constantinos Heracleous
>>> <[email protected] <mailto:[email protected]>> wrote:
>>>
>>> Hello,
>>> I’m trying to run matpower from simulink using a function call-back but I’m
>>> getting "PERSISTENT declarations may only appear at the top-level.” error
>>> in function mpoption line 551.
>>> Has anyone run matpower from simulink? or can you suggest something to try
>>> to fix the issue.
>>> Thank you,
>>> Constantinos
>>> Begin forwarded message:
>>>
>>>
>>>
>>
>