使用cellfun将scatter3应用于细胞阵列的每个细胞

时间:2019-02-20 06:23:07

标签: matlab matlab-figure cell-array scatter3d

如何在{3x10}的每个ycell单元格上应用numOfSensors = 10; numOfSets = 7; %% sample data preparation x = 1:3; y = rand(length(x), numOfSets*numOfSensors); yCell = mat2cell(y, 3, numOfSensors*ones(1,numOfSets)); % this is my sensor data ycell = {3x10} {3x10} {3x10} {3x10} {3x10} {3x10} {3x10}

scatter3

我已将矩阵转换为单元格数组。如何在此单元格数组的每个单元格上使用.Background { background-image:url("https://images.unsplash.com/photo-1517524285303-d6fc683dddf8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1275&q=80"); height: 220px; background-size: 100% 100%; background-repeat: no-repeat; position: absolute; height: 100%; width: 100%; z-index:0; } .Relative { position:relative; } .Absolute { position:relative; z-index: 1; } h2 { }

1 个答案:

答案 0 :(得分:0)

hold on;   %To retain the points of all cellfun iterations
view(3);   %To set the default 3D view
cellfun(@(k) scatter3(k(1,:),k(2,:),k(3,:)), yCell);%Applying scatter3 to each cell of yCell

output