Mathematica中文论坛-非官方

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 7072|回复: 0
打印 上一主题 下一主题

豆粑粑 matlab tensor scatter3 multi sup figure

[复制链接]

532

主题

603

帖子

3035

积分

论坛元老

Rank: 8Rank: 8

积分
3035
跳转到指定楼层
楼主
发表于 2017-8-24 20:35:30 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
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




  1. clear all
  2. clc

  3. % load Data.mat
  4. %
  5. % [num_ff,num_mm,num_k,num_n]=size(H);
  6. %
  7. % % % ff_line = [1:num_ff];
  8. % % % mm_line = [1:num_mm];
  9. % % % k_line  = [1:num_k ];
  10. % % % n_line  = [1:num_n ];
  11. % % %
  12. % % % x{1} = ff_line;
  13. % % % x{2} = mm_line;
  14. % % % x{3} = k_line;
  15. % % % x{4} = n_line;
  16. % % % n=4;
  17. % % %
  18. % % % [c{1:n}] = ndgrid(x{:});
  19. % % % c = cell2mat(cellfun(@(a)a(:),c,'un',0));
  20. % % %
  21. % % % [H_line]=H(:);
  22. % % X=real(H_line);
  23. % % Y=imag(H_line);
  24. %
  25. %
  26. %
  27. % colormap(jet)
  28. % all=[];
  29. % for i=1:num_ff
  30. %     for j=1:num_mm
  31. %         for k= 1:num_k
  32. %             for l=1:num_n
  33. %                 
  34. %                 all=[all;real(H(i,j,k,l)),imag(H(i,j,k,l)),i,j,k,l];
  35. %             end
  36. %         end
  37. %     end
  38. % end
  39. %
  40. % save Mat_6d.mat

  41. load Mat_6d.mat


  42. % ind=1:7:120000;

  43. col_dat={'hot';'cool';'summer';'winter';'gray';'pink'};
  44. view_mat=[-130 40
  45.           -130 40
  46.           -130 40
  47.           -130 40
  48.           -130 40
  49.           -130 40];
  50. sbp_width=0.8;
  51. sbp_heig=0.8;
  52. n_row = 1;
  53. n_col = 1;

  54. [out_pos]=fun_mm_subplot_pos(n_row,n_col,sbp_width,sbp_heig);




  55. cho_int=1;

  56. for i=1:6
  57.     ind= all(:,4)==i;
  58. %     tm = all;
  59.     clf
  60.     h=figure(1);
  61.     set(h, 'Position', [100, 100, 600, 400]);
  62.     ax=axes('position',out_pos(1,:));
  63.     scatter3(all(ind(1:cho_int:end),1),all(ind(1:cho_int:end),2),all(ind(1:cho_int:end),3),...
  64.         8+0.3*all(ind(1:cho_int:end),5),sqrt(all(ind(1:cho_int:end),6)),'o','filled')
  65.     colormap(gca,flipud(col_dat{i}))
  66.     axis tight
  67.     xlabel('real')
  68.     ylabel('imag')
  69.     zlabel('freq')
  70.    
  71.     view(-130, 40)
  72.     colorbar
  73.     title(['mm',mat2str(i)])
  74.     h=gcf;
  75.     fi_na=['./fig_dif_mm',mat2str(i)];
  76.      fun_work_li_035_myfig_out(h,fi_na,3);
  77. end
复制代码


Data.mat.zip

1.75 MB, 下载次数: 0

data

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|Mathematica中文论坛-非官方 ( 辽ICP备16001491号-1

GMT+8, 2024-5-5 15:20 , Processed in 0.128334 second(s), 28 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表