フィルターのクリア

Which block should be used for numel function in simulink?

1 回表示 (過去 30 日間)
Zexiong
Zexiong 2024 年 1 月 8 日
回答済み: Fangjun Jiang 2024 年 1 月 8 日
I want to express code accuracy = sum(predicted_labels == actual_labels)/numel(actual_labels) in simulink.
I choose "sum of Elements" for the function "sum(predicted_labels == actual_labels)".(I'm not sure. Is it correct?)
Which block should be used for numel function(numel(actual_labels) ) in simulink?

回答 (2 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2024 年 1 月 8 日
I don't know if there is any Simulink block for numel() or size(), which are handled in Simulink automatically. In your execise you shall try to use [MATLAB function] and through which you can determine the accuracy of your classification model (one output with two inputs) as you defined: accuracy = sum(predicted_labels == actual_labels)/numel(actual_labels).

Fangjun Jiang
Fangjun Jiang 2024 年 1 月 8 日

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by