Unix new line format
parent
bc4c342e6a
commit
e1b64eae1d
|
@ -1,63 +1,81 @@
|
||||||
function myoutput=pm3_core(myinputs,fpar,B,whoiam, ThisMatlab)
|
function myoutput=pm3_core(myinputs,fpar,nvar,whoiam, ThisMatlab)
|
||||||
|
|
||||||
|
|
||||||
if nargin<4,
|
if nargin<4,
|
||||||
whoiam=0;
|
whoiam=0;
|
||||||
end
|
end
|
||||||
struct2local(myinputs);
|
struct2local(myinputs);
|
||||||
|
|
||||||
|
|
||||||
global options_ M_ oo_
|
global options_ M_ oo_
|
||||||
|
|
||||||
|
|
||||||
figunumber = 0;
|
if whoiam
|
||||||
subplotnum = 0;
|
waitbarString = ['Parallel plots pm3 ...'];
|
||||||
hh = figure('Name',[tit1 ' ' int2str(figunumber+1)]);
|
if Parallel(ThisMatlab).Local,
|
||||||
RemoteFlag = 0;
|
waitbarTitle=['Local '];
|
||||||
if whoiam,
|
else
|
||||||
if Parallel(ThisMatlab).Local ==0
|
waitbarTitle=[Parallel(ThisMatlab).PcName];
|
||||||
RemoteFlag=1;
|
end
|
||||||
end
|
fMessageStatus(0,whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo);
|
||||||
end
|
end
|
||||||
|
|
||||||
OutputFileName = {};
|
|
||||||
|
|
||||||
for i=1:nvar
|
figunumber = 0;
|
||||||
NAMES = [];
|
subplotnum = 0;
|
||||||
if max(abs(Mean(:,i))) > 10^(-6)
|
hh = figure('Name',[tit1 ' ' int2str(figunumber+1)]);
|
||||||
subplotnum = subplotnum+1;
|
RemoteFlag = 0;
|
||||||
set(0,'CurrentFigure',hh)
|
if whoiam,
|
||||||
subplot(nn,nn,subplotnum);
|
if Parallel(ThisMatlab).Local ==0
|
||||||
plot([1 n2],[0 0],'-r','linewidth',0.5);
|
RemoteFlag=1;
|
||||||
hold on
|
end
|
||||||
for k = 1:9
|
end
|
||||||
plot(1:n2,squeeze(Distrib(k,:,i)),'-g','linewidth',0.5)
|
|
||||||
end
|
OutputFileName = {};
|
||||||
plot(1:n2,Mean(:,i),'-k','linewidth',1)
|
|
||||||
xlim([1 n2]);
|
for i=fpar:nvar
|
||||||
hold off
|
NAMES = [];
|
||||||
name = deblank(varlist(i,:));
|
if max(abs(Mean(:,i))) > 10^(-6)
|
||||||
NAMES = strvcat(NAMES,name);
|
subplotnum = subplotnum+1;
|
||||||
title(name,'Interpreter','none')
|
set(0,'CurrentFigure',hh)
|
||||||
end
|
subplot(nn,nn,subplotnum);
|
||||||
if subplotnum == MaxNumberOfPlotsPerFigure | i == nvar
|
plot([1 n2],[0 0],'-r','linewidth',0.5);
|
||||||
eval(['print -depsc2 ' M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:)) '.eps' ]);
|
hold on
|
||||||
if ~exist('OCTAVE_VERSION')
|
for k = 1:9
|
||||||
eval(['print -dpdf ' M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:))]);
|
plot(1:n2,squeeze(Distrib(k,:,i)),'-g','linewidth',0.5)
|
||||||
saveas(hh,[M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:)) '.fig']);
|
end
|
||||||
end
|
plot(1:n2,Mean(:,i),'-k','linewidth',1)
|
||||||
if RemoteFlag==1,
|
xlim([1 n2]);
|
||||||
OutputFileName = [OutputFileName; {[M_.dname, filesep, 'Output',filesep], [M_.fname '_' name3 '_' deblank(tit3(i,:)) '.*']}];
|
hold off
|
||||||
end
|
name = deblank(varlist(i,:));
|
||||||
if options_.nograph, close(hh), end
|
NAMES = strvcat(NAMES,name);
|
||||||
subplotnum = 0;
|
title(name,'Interpreter','none')
|
||||||
figunumber = figunumber+1;
|
end
|
||||||
if (i ~= nvar)
|
if subplotnum == MaxNumberOfPlotsPerFigure | i == nvar
|
||||||
hh = figure('Name',[name3 ' ' int2str(figunumber+1)]);
|
eval(['print -depsc2 ' M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:)) '.eps' ]);
|
||||||
end
|
if ~exist('OCTAVE_VERSION')
|
||||||
end
|
eval(['print -dpdf ' M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:))]);
|
||||||
|
saveas(hh,[M_.dname '/Output/' M_.fname '_' name3 '_' deblank(tit3(i,:)) '.fig']);
|
||||||
end
|
end
|
||||||
|
if RemoteFlag==1,
|
||||||
|
OutputFileName = [OutputFileName; {[M_.dname, filesep, 'Output',filesep], [M_.fname '_' name3 '_' deblank(tit3(i,:)) '.*']}];
|
||||||
myoutput.OutputFileName=OutputFileName;
|
end
|
||||||
|
if options_.nograph, close(hh), end
|
||||||
|
subplotnum = 0;
|
||||||
|
figunumber = figunumber+1;
|
||||||
|
if (i ~= nvar)
|
||||||
|
hh = figure('Name',[name3 ' ' int2str(figunumber+1)]);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if whoiam,
|
||||||
|
waitbarString = [ 'Variable ' int2str(i) '/' int2str(nvar) ' done.'];
|
||||||
|
fMessageStatus((i-fpar+1)/(nvar-fpar+1),whoiam,waitbarString, waitbarTitle, Parallel(ThisMatlab), MasterName, DyMo)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
myoutput.OutputFileName=OutputFileName;
|
||||||
|
|
Loading…
Reference in New Issue