Thank you for your help. I got it resolved. I think I should post my working 
code in case someone else needs it in the future.
After setting the path, I used the code;
>> mpc = loadcase('case9')
>> ExBus=[1,5,8]'
>> [mpcreduced,Link,BCIRCr]=MPReduction(mpc,ExBus,0)
>> [ynew] = ext2int(mpcreduced)
>> [y1] = makeYbus(ynew)

At this point, you should have the 6 x 6 matrix. To see the renumbering done on 
the buses and generator by the ext2int function, go to workspace, then 
ynew>ynew.order>bus/gen.

Thank you.

From: Abhyankar, Shrirang G. [mailto:[email protected]]
Sent: Wednesday, July 27, 2016 9:01 AM
To: Philip Adedotun Olaniyi <[email protected]>
Cc: MATPOWER discussion forum <[email protected]>
Subject: Re: How do I print the reduced Ybus matrix


1. You need to have the MATPOWER directory on your MATLAB path.  
http://www.mathworks.com/help/matlab/matlab_env/add-remove-or-reorder-folders-on-the-search-path.html
2. YBUS, YF, YT] = makeYbus(mpc) should be YBUS, YF, YT] = makeYbus(mpcreduced);

Shri

From:  Philip Adedotun Olaniyi <[email protected]<mailto:[email protected]>>
Date:  Wednesday, July 27, 2016 at 9:34 AM
To:  Shri <[email protected]<mailto:[email protected]>>
Subject:  Re: How do I print the reduced Ybus matrix


Hi Abhyankar,
Thank yo so much for your help. I tried using makeYbus function as you 
suggested, but I keep getting error messages. Please see them below;
When I tried;
mpc = loadcase('case9');
ExBus=[1,5,8]';
[mpcreduced, Link, BCIRCr] = MPReduction(mpc,ExBus,0)
[YBUS, YF, YT] = makeYbus(mpc,ExBus,0)
I got the message;
Error using makeYbus (line 45)
makeYbus: buses must be numbered consecutively in bus matrix; use ext2int() to 
convert to internal ordering

When I tried;
mpc = loadcase('case9');
ExBus=[1,5,8]';
[mpcreduced, Link, BCIRCr] = MPReduction(mpc,ExBus,0)
[YBUS, YF, YT] = makeYbus(mpc)
I got the message;
Undefined function or variable 'makeYbus'.
I don't know any other thing to try. I would appreciate your further assistance.

Thank you.

Reply via email to