Aiming at the problem that plot3 function drawing in MATLAB only outputs points instead of line

项目场景:

  • Data processing stage mapping stage


问题描述

  • In the MATLAB environment plot3 plot output is only points rather than lines

  • figure
    for i6=1:step
     
    plot3(DiscretePoint_CP{i6,1}(1,1),DiscretePoint_CP{i6,1}(2,1),DiscretePoint_CP{i6,1}(3,1),'ro')
    hold on
    grid on
    
    end


原因分析:

  • The plot3 function under the for loop is a dot - by - dot plot

解决方案:

  • The drawing data is stored as an array, and the plot3 function is directly used for array drawing without using for loop
  • for i11=1:50
        
    X_point(i11,1)=DiscretePoint_CP{i11,1}(1,:);
    Y_point(i11,1)=DiscretePoint_CP{i11,1}(2,:);
    Z_point(i11,1)=DiscretePoint_CP{i11,1}(3,:);
    
    end
    plot3(X_point(:,1),Y_point(:,1),Z_point(:,1),'r-')%
    

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值