Dear All I am trying to run the following two lines :
*mpc = case300; [ref, pv, pq] = bustypes(mpc.bus, mpc.gen);* And this is what I get: *Error using sparse Index exceeds matrix dimensions. Error in bustypes (line 49)Cg = sparse(gen(:, GEN_BUS), (1:ng)', gen(:, GEN_STATUS) > 0, nb, ng); %% gen connection matrix*
however If I run *runpf('case300') *there is no problem and the power flow problem is solved!!!
Houssem
