Which block should be used for numel function in simulink?

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?

Respuestas (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 8 de En. de 2024
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).

Categorías

Más información sobre Deep Learning with Simulink en Centro de ayuda y File Exchange.

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 8 de En. de 2024

Respondida:

el 8 de En. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by