Determine if a value has changed after some operations?

Hi all,
How can I determine if a value has changed or not after some operations? For example:
testA = valueA;
% after some operations, testA = valueA or valueB;
% if value of testA changes, continue operation, elseif unchanges, cease operation.

回答 (1 件)

Guillaume
Guillaume 2018 年 4 月 23 日

0 投票

testA = valueA;
oldtestA = testA;
%... do some operations that may change testA
if oldtestA ~= testA %assuming that testA is scalar
%value has changed
else
%value has not changed
end

カテゴリ

ヘルプ センター および File ExchangeMathematics and Optimization についてさらに検索

タグ

質問済み:

2018 年 4 月 23 日

回答済み:

2018 年 4 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by