当前位置: 首页 > 程序语言 >怎么编程实现MATLAB三维图形沿Z轴平移

怎么编程实现MATLAB三维图形沿Z轴平移

作者 18265067267
来源: 小木虫 300 6 举报帖子
+关注

怎么编程实现MATLAB三维图形沿Z轴平移

 返回小木虫查看更多

今日热帖
  • 精华评论
  • Mr__Right

    CODE:
    clear all;
    close all;
    clc;
    peaks(50);
    ha=gca;
    hs=ha.Children;
    set(ha,'ZLim',[-5,60]);
    for k=0:50,
    hs.ZData=hs.ZData+1;
    pause(0.3);
    end

  • Mr__Right

    引用回帖:
    2楼: Originally posted by Mr__Right at 2017-04-10 15:23:43
    clear all;
    close all;
    clc;
    peaks(50);
    ha=gca;
    hs=ha.Children;
    set(ha,'ZLim',);
    for k=0:50,
    hs.ZData=hs.ZData+1;
    pause(0.3);
    end

    看上去结果是这样的

  • 言西早幻城

    引用回帖:
    3楼: Originally posted by Mr__Right at 2017-04-11 06:34:00
    看上去结果是这样的
    http://img.blog.csdn.net/20170410213743866...

    运行matlab版本是?,我用2013b运行代码提示line6有错误,改成,hs=get(ha,'children');后又提示第10行有错误:
    Attempt to reference field of non-structure array.

    Error in Untitled2 (line 9)
    hs.ZData=hs.ZData+1;

  • 言西早幻城

    是第九行有错误

  • Mr__Right

    引用回帖:
    4楼: Originally posted by 言西早幻城 at 2017-04-12 09:47:39
    运行matlab版本是?,我用2013b运行代码提示line6有错误,改成,hs=get(ha,'children');后又提示第10行有错误:
    Attempt to reference field of non-structure array.

    Error in Untitled2 (line 9)
    hs.ZData= ...

    我写的这个代码,2014b之后的版本才行。
    改成之前的版本很容易的
    http://blog.csdn.net/stereohomology/article/details/70036879

  • 言西早幻城

    引用回帖:
    6楼: Originally posted by Mr__Right at 2017-04-12 11:29:37
    我写的这个代码,2014b之后的版本才行。
    改成之前的版本很容易的
    http://blog.csdn.net/stereohomology/article/details/70036879...

    可以了!膜拜!!!

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓