Skip to content
Snippets Groups Projects
Commit 0b71a7d9 authored by Nicolas Mansard's avatar Nicolas Mansard
Browse files

ivigit.

parent 54b3226a
No related branches found
No related tags found
No related merge requests found
function [e] = ddname
%e='C:\nmansard\code\VS_SAI-II\vsProject\xmlData\high-end-models-sentis\puma';
%e='C:\nmansard\code\VS_SAI-II\vsProject\xmlData\high-end-models-sentis\stanbot\non-fixed';
%e='C:\nmansard\code\VS_SAI-II\vsProject\xmlData\high-end-models-sentis\pa10';
%e='C:\nmansard\code\VS_SAI-II\vsProject\xmlData\high-end-models-sentis\pa10\xp1\xp1\c_freespace';
%e='C:\nmansard\code\VS_SAI-II\vsProject\xmlData\high-end-models-sentis\pa10\xp2\xp2\c_free';
e='/tmp/';
%e='/tmp/nmansard/exec';
%e='/home/nmansard/src/StackOfTasks/matlab/mesures_calib/onlinecomplet/';
%e='/home/nmansard/src/StackOfTasks/traces/exp1_seq';
function [h]=nmcolor(x,e,idx,name);
argc = nargin;
dim=size(e);
l=max(dim); n=min(dim);
if (argc==1)
e=x; [l n]=size(e); x=1:l;
argc = argc+1;
end;
if (argc==2)
idx=-1;
argc = argc+1;
end;
if (argc==3)
name = 'Plot ';
argc = argc+1;
end;
if (idx==-1)
idx=1:n;
end
nb_task=n;
for i=find(idx>n)
warning(sprintf('Plot index %d is not valid.',i));
end
idx=idx(find(idx<=n));
color = [ 0.75 0.75 0; 0 0 0.4; 1 0 0; 0 .5 0 ];
lwb = [ .5 2 .5 2 .5 2 .5 2 .5 2 .5 2];
lwb = [ .1 8 .5 2 .5 2 .5 2 .5 2 .5 2];
nbcolor=length(color(:,1));
color=[color;color];color=[color;color];color=[color;color];color=[color;color];
lw=[]; for i=lwb lw=[lw;ones(nbcolor,1)*i]; end
sty = ['- ';'- ';'- ';'- '];
sty = [sty;sty];sty = [sty;sty];sty = [sty;sty];sty = [sty;sty];
% gcf;
h=[];
seq=0;
for i=idx
idxs=mod(seq,length(sty))+1;
idxw=mod(seq,length(lw))+1;
idxc=mod(seq,length(color))+1;
hi=plot(x, e(:,i), 'color',color(idxc,:),'LineWidth',lw(idxw),'LineStyle',sty(idxs,:));
h=[h hi];
hold on;
seq=seq+1;
end;
%if separation
% ax =axis;
% hold on;
% st=stem(task*ax(3), '.k');
% set(st,'MarkerSize',1);
% st=stem(task*ax(4), '.k');
% set(st,'MarkerSize',1);
% hold off;
% axis(ax);
%end;
xlabel('Iterations');
ylabel('Values');
legende=[];
for i=idx
legende = [legende; sprintf('%s % 4d',name,i)];
end;
%legend(legende);
function [e t] = p (filename,idx,dirname);
argc = nargin;
if (argc==0)
filename='pos';
argc = argc+1;
end;
if (argc==1)
idx=-1;
argc = argc+1;
end;
if (argc==2)
dirname=ddname;
argc = argc+1;
end;
name=sprintf ('%s/%s.dat',dirname,filename);
e=load(name);
%size(e);
t=e(:,1);
e=e(:,2:end);
nmcolor(t,e,idx,'P ');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment