|
Got a tensor, H(ff,m,k,n), the value is x+yi.
The plot should be (x,y,ff), with maker size (k) and color (n)
There are 6 values of m.
So 6 subplot
- clear all
- clc
- % load Data.mat
- %
- % [num_ff,num_mm,num_k,num_n]=size(H);
- %
- % % % ff_line = [1:num_ff];
- % % % mm_line = [1:num_mm];
- % % % k_line = [1:num_k ];
- % % % n_line = [1:num_n ];
- % % %
- % % % x{1} = ff_line;
- % % % x{2} = mm_line;
- % % % x{3} = k_line;
- % % % x{4} = n_line;
- % % % n=4;
- % % %
- % % % [c{1:n}] = ndgrid(x{:});
- % % % c = cell2mat(cellfun(@(a)a(:),c,'un',0));
- % % %
- % % % [H_line]=H(:);
- % % X=real(H_line);
- % % Y=imag(H_line);
- %
- %
- %
- % colormap(jet)
- % all=[];
- % for i=1:num_ff
- % for j=1:num_mm
- % for k= 1:num_k
- % for l=1:num_n
- %
- % all=[all;real(H(i,j,k,l)),imag(H(i,j,k,l)),i,j,k,l];
- % end
- % end
- % end
- % end
- %
- % save Mat_6d.mat
- load Mat_6d.mat
- % ind=1:7:120000;
- col_dat={'hot';'cool';'summer';'winter';'gray';'pink'};
- view_mat=[-130 40
- -130 40
- -130 40
- -130 40
- -130 40
- -130 40];
- sbp_width=0.8;
- sbp_heig=0.8;
- n_row = 1;
- n_col = 1;
- [out_pos]=fun_mm_subplot_pos(n_row,n_col,sbp_width,sbp_heig);
- cho_int=1;
- for i=1:6
- ind= all(:,4)==i;
- % tm = all;
- clf
- h=figure(1);
- set(h, 'Position', [100, 100, 600, 400]);
- ax=axes('position',out_pos(1,:));
- scatter3(all(ind(1:cho_int:end),1),all(ind(1:cho_int:end),2),all(ind(1:cho_int:end),3),...
- 8+0.3*all(ind(1:cho_int:end),5),sqrt(all(ind(1:cho_int:end),6)),'o','filled')
- colormap(gca,flipud(col_dat{i}))
- axis tight
- xlabel('real')
- ylabel('imag')
- zlabel('freq')
-
- view(-130, 40)
- colorbar
- title(['mm',mat2str(i)])
- h=gcf;
- fi_na=['./fig_dif_mm',mat2str(i)];
- fun_work_li_035_myfig_out(h,fi_na,3);
- end
复制代码
|
|