フィルターのクリア

Easy way to divide a field in a struct by a number?

11 ビュー (過去 30 日間)
PAK
PAK 2018 年 7 月 16 日
回答済み: Image Analyst 2018 年 7 月 16 日
Hello All,
I have a 5394 x 1 struct with 2 fields labeled "cluster" and "spx_time". I'd like to divide all values in the "spx_time" field by 1000. Is there an easier way to do this other than by using a for loop?
Thanks!

採用された回答

Image Analyst
Image Analyst 2018 年 7 月 16 日
If you want to extract them into a double variable you can avoid a for loop (though one might be done internally with []):
new_spx_times = [s.spx_time] / 1000;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

タグ

製品


リリース

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by