我有一个绘制点云的函数。当我调用该函数时,它会显示点云,但是一旦该函数退出,视图也会退出。如何防止视图退出?
function drawPtCloud(ptCloud,colorLabels)
player = pcplayer(xlimits, ylimits, zlimits);
view(player, ptCloud,colorLabels);
end
答案 0 :(得分:1)
轴实际上保存在pcplayer
的输出参数中。将pcplayer
的输出参数,即player
用作自定义函数drawPtCloud
的输出参数。即
function player = drawPtCloud(ptCloud, colorLabels)
player = pcplayer(xlimits, ylimits, zlimits);
view(player, ptCloud,colorLabels);
end