I am not able to reproduce that error. That command works fine for me on 
MATPOWER 6.0. I suspect there may be something wrong with your MATPOWER 
installation. I’m guessing either one of the MATPOWER files has been 
inadvertently modified from the original, or MATPOWER has not been properly 
installed.

I recommend downloading the latest (v7.1) from the MATPOWER web site 
(https://matpower.org) and following the installation instructions to get a 
working version.

Let me know if that doesn’t work and we’ll take it from there.

    Ray



On Oct 18, 2022, at 7:45 PM, naime ahmadi 
<[email protected]<mailto:[email protected]>> wrote:

Hello,
I run the below code
[MVAbase, bus, gen, branch, success]=runpf('case14');

and I got this error:

MATPOWER Version 6.0, 16-Dec-2016 -- AC Power Flow (Newton)
Operator '-' is not supported for operands of type 'function_handle'.

Error in newtonpf (line 52)
mis = V .* conj(Ybus * V) - Sbus;  % Sbus(Vm)

Error in runpf (line 204)
                [V, success, iterations] = newtonpf(Ybus, Sbus, V0, ref,
                pv, pq, mpopt);

Error in Example_2 (line 72)
[MVAbase, bus, gen, branch, success]=runpf('case14');

I do not know how to fix this.
Thank you,
Naime


Reply via email to