mpc=loadcase('case14o’);
for t=1:2
mpc(t)=mpc;
^^^^^^^^^^^^
mpc(t).bus = scale_load(0.5, mpc(t).bus);

The error is in the third line of your code. You are resizing the mpc struct 
created in the first line and hence getting the structure resizing error. Use 
the following code.

mpc0=loadcase('case14o’);
for t=1:2
mpc(t)=mpc0;
mpc(t).bus = scale_load(0.5, mpc(t).bus);


Also, please please please send the ENTIRE error message when asking for help 
in the future.

Shri


From: Ray Zimmerman <[email protected]<mailto:[email protected]>>
Reply-To: MATPOWER discussion forum 
<[email protected]<mailto:[email protected]>>
Date: Tuesday, February 23, 2016 at 9:28 AM
To: MATPOWER discussion forum 
<[email protected]<mailto:[email protected]>>
Subject: Re: scaleload

It looks to me like when you go to store the return value of runopf() in 
results it is finding that the existing results struct has different fields 
than the one being returned by runopf(). Try clearing the results variable 
first and if that doesn’t work, you can probably work around it by storing the 
results in a cell array instead of a struct array. That is, use …

results = cell(nt, 1);
results{t} = runopf(...);

— Ray


On Feb 20, 2016, at 9:33 AM, VANJARAPU VENKATARAONAIDU 
<[email protected]<mailto:[email protected]>> wrote:

sir
when using the scaleload function,when run the opf its showing the error 
attached below.what is the problem,how can i rectify it.
<time.txt>

Reply via email to