0

新用户来了!目前正在尝试绘制由置信区间组成的误差线,并且数据集由先前计算的轮廓(cmatrix)的坐标组成。我收到此错误:

x, y, and errorbars must all be the same length.

midpointPositionMean并且midpointPositionConf95都是由 1x8 向量组成的 4x3 矩阵。midpointPosition是一个 3x4 矩阵。StatsonCells计算平均值和 95% 的置信区间。我必须改变什么?

[midpointPositionMean,midpointPositionConf95]=StatsOnCells(midpointPosition');

errorbar([0.85,1.15,1.45],...
  cell2mat(midpointPositionMean),...
  cell2mat(midpointPositionConf95),...
  'bx');
hold on;
plot(repmat(0.85,size(midpointPosition(1,:))),...
  midpointPosition(1,:),'ob','MarkerFaceColor','b')

plot(repmat(1.15,size(midpointPosition(2,:))),...
  midpointPosition(2,:),'ob','MarkerFaceColor','b')

plot(repmat(1.45,size(midpointPosition(3,:))),...
  midpointPosition(3,:),'ob','MarkerFaceColor','b')
4

0 回答 0