Hello everybody, my output is a structure like Run = theta: {1x10 cell} sigma:{1x10 cell} I want to compute the mean of theta and sigma. I would be grateful if you could lead howI should do that?
1 次查看(过去 30 天)
显示 更早的评论
Run =
theta: {1x10 cell}
sigma: {1x10 cell}
2 个评论
Thorsten
2015-6-30
Please formally accept my answer, such that the question is marked as "answered" and is not considered by others anymore.
回答(1 个)
Thorsten
2015-6-30
编辑:Thorsten
2015-6-30
mean(cell2mat(Run.theta))
mean(cell2mat(Run.sigma))
You could also rewrite your program and return a 10x2 matrix Y with the 10 theta values in the first row and the 10 sigma values in the second row, and then compute the mean of both using
mean(Y)
1 个评论
Walter Roberson
2015-6-30
I think you mean "with the 10 theta values in the first column and the 10 sigma values in the second column"
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!