フィルターのクリア

change the value of a data structure field

2 ビュー (過去 30 日間)
Trop Trader
Trop Trader 2024 年 4 月 6 日
編集済み: Stephen23 2024 年 4 月 7 日
it's possible to avoid loop? thank
class(app.Sis)
ans =
'struct'
Sis(1).Val
ans =
'l'
h=size(Sis,2);
for i=1:h
Sis(i).Val='kkk';
end

採用された回答

Fangjun Jiang
Fangjun Jiang 2024 年 4 月 6 日
編集済み: Fangjun Jiang 2024 年 4 月 6 日
s(3).Val='1';
s.Val
ans = [] ans = []
ans = '1'
[s.Val]=deal('2')
s = 1x3 struct array with fields:
Val
s.Val
ans = '2'
ans = '2'
ans = '2'

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by