フィルターのクリア

find a mean of values in a field of a struct

2 ビュー (過去 30 日間)
elisa ewin
elisa ewin 2017 年 5 月 22 日
編集済み: Andrei Bobrov 2017 年 5 月 22 日
Hi,
I have a struct (attached) and I want to find the mean for userTouristicTraj(i).pauseTime.pt i = 1:size(userTouristicTraj,2) and I want to save it in userTouristicTraj(i).pauseTime.pt_mean: can you help me? thanks

採用された回答

Andrei Bobrov
Andrei Bobrov 2017 年 5 月 22 日
編集済み: Andrei Bobrov 2017 年 5 月 22 日
for ii = 1:numel(userTouristicTraj)
if ~isempty(userTouristicTraj(ii).pauseTime)
userTouristicTraj(ii).pauseTime(1).pt_mean = ...
mean([userTouristicTraj(ii).pauseTime.pt]);
end
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by