Why are these two variables not the same value?
古いコメントを表示
I think I'm going crazy because I have two differently named variables both set equal to the same thing but they are returning different values. These are the variables:
Max.H1_E_RT_Moment_Max = max(abs(E.RT_Moment_Y_Ave));
Max.H2_E_RT_Moment_Max_Y = max(abs(E.RT_Moment_Y_Ave));
These are the returned values:
Max.H1_E_RT_Moment_Max = 57.7207
Max.H2_E_RT_Moment_Max_Y = 21.0916
Is there any reason why this might be happening?
5 件のコメント
Walter Roberson
2022 年 12 月 10 日
Sounds like E or E.RT_Moment_Y_Ave are changing in between the two calls.
By the way, could you confirm that E is a scalar struct? Or is this object-oriented work in which case RT_Moment_Y_Ave could potentially be a method ?
Joshua Lucas Ewert
2022 年 12 月 10 日
Joshua Lucas Ewert
2022 年 12 月 10 日
Walter Roberson
2022 年 12 月 10 日
Is it practical to post the code and any relevant data, so we can test?
Joshua Lucas Ewert
2022 年 12 月 10 日
編集済み: Joshua Lucas Ewert
2022 年 12 月 10 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Variables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!