clc close all k=1; for i=1:length(data.variablename) if strcmp(data.variablename(i),"mag[0]") tempsx(k,:)=data.x(i); x(k,:)=data.y(i); k=k+1; end end k=1; for i=1:length(data.variablename) if strcmp(data.variablename(i),"mag[1]") tempsy(k,:)=data.x(i); y(k,:)=data.y(i); k=k+1; end end k=1; for i=1:length(data.variablename) if strcmp(data.variablename(i),"mag[2]") tempsz(k,:)=data.x(i); z(k,:)=data.y(i); k=k+1; end end lmin=min([length(x),length(y),length(z)]); vec=1:lmin; figure() plot(tempsx(vec),x(vec),'r') grid on ylabel('mag x') xlabel('tps (s)') figure() plot(tempsy(vec),y(vec),'k') grid on ylabel('mag y') xlabel('tps (s)') figure() plot(tempsz(vec),z(vec),'b') grid on ylabel('mag z') xlabel('tps (s)') figure() plot(tempsx(vec),sqrt(x(vec).^2+y(vec).^2+z(vec).^2),'b*') grid on ylabel('norme') xlabel('tps (s)') figure() plot(x(vec),y(vec),'r.') grid on xlabel('mag X') ylabel('mag Y') figure() plot(y(vec),z(vec),'b.') grid on xlabel('mag Y') ylabel('mag Z') figure() plot(z(vec),x(vec),'g.') grid on xlabel('mag Z') ylabel('mag X') figure() plot3(x(vec),y(vec),z(vec),'r') grid on