24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 510  |  回复: 4
当前主题已经存档。
【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 positron 的 10 个金币

positron

木虫 (职业作家)

[交流] 【讨论】matlab中slice函数切片显示时的切片方向

matlab中slice函数可以完成四维函数的绘制,但切片命令中slice(x,y,z,v,x1,y1,z1)只能对垂直于坐标轴的方向切片,即slice(x,y,z,v,x1,y1,3)切z=3的剖面,如没有可能切任意的方向,和坐标轴的夹角可以任意设定呢?

学习slice函数过程中联想到的,不知可有人碰到这个问题,呵呵
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

positron

木虫 (职业作家)

★ ★ ★
0112358(金币+3):现在大家都放假了,来的人相对较少,鼓励这样的讨论,水区毕竟不是干事的地方,以后多来程序版吧,呵呵
好像大家都不讨论,不知道是人气差还是讨论没意思

都去水区了么,哈哈

刚才去mathworks看了下(实在不想看英文,嗯)

还是找到了答案

Slicing At Arbitrary Angles

You can also create slices that are oriented in arbitrary planes. To do this,

    *

      Create a slice surface in the domain of the volume (surf, linspace).
    *

      Orient this surface with respect to the axes (rotate).
    *

      Get the XData, YData, and ZData of the surface (get).
    *

      Use this data to draw the slice plane within the volume.

For example, these statements slice the volume in the first example with a rotated plane. Placing these commands within a for loop "passes" the plane through the volume along the z-axis.

for i = -2:.5:2
        hsp = surf(linspace(-2,2,20),linspace(-2,2,20),zeros(20)+i);
        rotate(hsp,[1,-1,1],30)
        xd = get(hsp,'XData');
        yd = get(hsp,'YData');
        zd = get(hsp,'ZData');
        delete(hsp)
        slice(x,y,z,v,[-2,2],2,-2) % Draw some volume boundaries
        hold on
        slice(x,y,z,v,xd,yd,zd)
        hold off
        axis tight       
        view(-5,10)       
        drawnow
end

The following picture illustrates three positions of the same slice surface as it passes through the volume.
2楼2009-08-02 10:00:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

positron

木虫 (职业作家)

这10个金币就捐助吧

鼓励讨论
3楼2009-08-02 10:01:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

change0618

铁杆木虫 (著名写手)

方丈大师

0112358(金币+0):积极参与楼主的讨论或者参与程序版任何求助贴并认真作答,金币大大地有,呵呵
捐给我吧
4楼2009-08-02 10:51:45
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

woshilsh

荣誉版主 (职业作家)

优秀版主

不懂你的东西

但见过画点的梯度方向的,去搜搜帮助
[center][url=http://www.91cool.net/][img]http://id.91cool.net/sign/?name=小木虫印&say=各位版主辛苦了![/img][/url][/center]
5楼2009-08-02 15:35:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 positron 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿双一流机械285分求调剂 +3 幸运的三木 2026-03-29 4/200 2026-03-29 10:46 by 想上岸了呜呜
[考研] 291求调剂 +4 Y-cap 2026-03-29 4/200 2026-03-29 10:16 by lbsjt
[考研] 330分求调剂 +5 qzenlc 2026-03-29 5/250 2026-03-29 07:37 by 无际的草原
[考研] 322求调剂 +7 宋明欣 2026-03-27 7/350 2026-03-28 21:27 by sanrepian
[考研] 压国家一区线,求导师收留,有恩必谢! +7 迷人的哈哈 2026-03-28 7/350 2026-03-28 16:47 by 催化大白
[考研] 320分,材料与化工专业,求调剂 +9 一定上岸aaa 2026-03-27 13/650 2026-03-28 15:00 by 神马都不懂
[考研] 一志愿中南大学化学0703总分337求调剂 +5 niko- 2026-03-27 5/250 2026-03-28 14:25 by 唐沐儿
[考研] 339求调剂,想调回江苏 +6 烤麦芽 2026-03-27 8/400 2026-03-28 10:40 by 烤麦芽
[考研] 一志愿南京航空航天大学材料学硕求调剂 +3 @taotao 2026-03-28 3/150 2026-03-28 10:26 by JourneyLucky
[考研] 328求调剂 +7 嗯滴的基本都 2026-03-27 7/350 2026-03-28 04:19 by fmesaito
[考研] 07化学280分求调剂 +10 722865 2026-03-23 10/500 2026-03-27 15:51 by Plutoqq
[考研] 359求调剂 +4 王了个楠 2026-03-25 4/200 2026-03-27 08:43 by 不吃魚的貓
[考研] 调剂求收留 +7 果然有我 2026-03-26 7/350 2026-03-27 00:26 by wxiongid
[考研] 321求调剂 +6 Ymlll 2026-03-24 6/300 2026-03-26 20:50 by 不吃魚的貓
[考研] 303求调剂 +6 蓝山月 2026-03-25 6/300 2026-03-25 22:47 by 418490947
[考研] 296求调剂 +4 汪!?! 2026-03-25 7/350 2026-03-25 16:41 by 汪!?!
[考研] 求调剂 +3 李李不服输 2026-03-25 3/150 2026-03-25 13:03 by cmz0325
[考研] 085404电子信息284分求调剂 +4 13659058978 2026-03-24 4/200 2026-03-24 12:15 by syl20081243
[考研] 341求调剂(一志愿湖南大学070300) +5 番茄头--- 2026-03-22 6/300 2026-03-23 23:45 by Txy@872106
[考研] 一志愿国科过程所081700,274求调剂 +3 三水研0水立方 2026-03-23 3/150 2026-03-23 23:11 by MajorWen
信息提示
请填处理意见