'discrete average model 3' is not a valid model name because it is not a valid MATLAB function name.
This is the error that occur while running my model.
But the name is autogenerated. How can i fix this error?

1 Kommentar

deyyam
deyyam am 24 Aug. 2026 um 6:21
Bearbeitet: Walter Roberson am 24 Aug. 2026 um 18:11
t= t0:dt:tf; % generate the time vector
showing this error while i creating trignometric plots using time varient user choice function

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Dhruv
Dhruv am 2 Jun. 2025

0 Stimmen

The error occurs because 'discrete average model 3' is not a valid MATLAB function name. It contains spaces, which are not allowed.
In MATLAB, file names must start with a letter and can only contain alphanumeric characters and underscores. To fix it, rename the model or file to a valid name like 'discrete_average_model_3'. Also, check any subsystem or block names for invalid characters and update them. This should resolve the error during simulation or code generation.
I hope this helps!

Kategorien

Gefragt:

am 3 Nov. 2019

Bearbeitet:

am 24 Aug. 2026 um 18:11

Community Treasure Hunt

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

Start Hunting!

Translated by