Answer Question
How to get the plot in matlab of the example hyst_plot?
hello,everybody ,the fellowing code is come from the example of pscad 4.6 , hyst_plot :
function [out_IF] = hyst_plot(I_F)
%
% This function is generated by MATLAB-PSCAD component generator V1.0
%
% Input:
% I_F of dimension 2 1
%
%
% Output:
% out_IF of dimension 1 1
global Ia flux my_nom
n2=15; % points number
Flim=2.5; % Flux limit
Ilim=0.1; % Current limit
%if ~exist('my_nom')
my_nom=1;
Ia(n2)=0;
flux(n2)=0;
%end
figure(1);
for i=n2-1:-1:1
Ia(i+1)=Ia(i);
flux(i+1)=flux(i);
end
Ia(1)=I_F(1);
flux(1)=I_F(2);
% line(Ia,flux);
plot(Ia,flux);
set (gca,'XLim',[-Ilim Ilim],'YLim',[-Flim Flim]);
pause(realmin);
the question is how the simulation result of PSCAD is pass to MTLAB array of Ia(50) ,in my opinion ,Ia(50)=Ia(48)=Ia(48)=...Ia(2)=Ia(1)。is there a document for this case ? thankyou for all!