How can I make 3d plots of planes by using spreadsheet in matlab

后端 未结 2 2019
南笙
南笙 2021-01-28 16:18
pointA=[9.62579 15.7309 3.3291];
pointB=[13.546  25.6869 3.3291];
pointC=[23.502  21.7667 -3.3291];
pointD=[19.5818 11.8107 -3.3291];

points=[pointA\' pointB\' pointC\'         


        
2条回答
  •  深忆病人
    2021-01-28 16:43

    clear all, close all, clc
    pointA=rand(99,1);
    pointB=rand(99,1);
    pointC=rand(99,1);
    pointD=rand(99,1);
    pointAmat = reshape(pointA,3,1,[]);
    pointBmat = reshape(pointB,3,1,[]);
    pointCmat = reshape(pointC,3,1,[]);
    pointDmat = reshape(pointD,3,1,[]);
    
    points=[pointAmat pointBmat pointCmat pointDmat];
    
    for i = 1:size(points,3)
    fill3(points(1,:,i),points(2,:,i),points(3,:,i),'r')
    hold all
    end
    grid on
    alpha(0.3)
    

    Hope this helps.

提交回复
热议问题