pm_hash - have values changed in recent version of Matlab?

1 回表示 (過去 30 日間)
Steve Van Hooser
Steve Van Hooser 2019 年 12 月 11 日
回答済み: Steve Van Hooser 2022 年 2 月 6 日
I sometimes use pm_hash to compute hash numbers across Matlab platforms AND across Matlab versions. For many years, this worked great.
However, I recently updated to Matlab 2019a, and I just noticed that the pm_hash('crc',X) values that are computed for a Matlab variable X are now changed.
Does anyone know when the change occurred? Probably this was later than Matlab 2017a, but I no longer have those versions installed. Have others found that this has changed also? Is this a bug or intentional?
  2 件のコメント
Guillaume
Guillaume 2019 年 12 月 11 日
Is pm_hash a matlab function? It's certainly not part of base matlab and a search for it doesn't return much.
Steve Van Hooser
Steve Van Hooser 2019 年 12 月 11 日
No, it is presently part of the SimScape toolbox. On my system:
built-in (/Applications/MATLAB_R2019a.app/toolbox/physmod/common/foundation/mli/m/pm_hash)
However, it has been really useful because it can accept a variable of any type. If I have a custom data type and a variable A of that type, I can call:
hash = pm_hash('crc',A)
and it returns a uint32 hash string based on its data.
Best
Steve

サインインしてコメントする。

採用された回答

Steve Van Hooser
Steve Van Hooser 2022 年 2 月 6 日
This does not answer the question as to whether the pm_hash has changed, but there is a decent replacement for pm_hash (which does not require Simulink/Simscape) is described here:
followed by https://www.mathworks.com/matlabcentral/fileexchange/31272-datahash
Best
Steve

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by