The error "my_model is an invalid option" when calling the linmod('my_model.slx') is most likely due to one of the following issues:
- linmod takes only the model’s name, without the .slx or .mdl extension. If your model is named my_model.slx, you should call: linmod('my_model').
- linmod requires the model to be loaded or open before linearization. use load_system('my_model') or open_system('my_model').
- linmod linearizes around the model's top-level Inport and Outport blocks. Place the Inport and Outport blocks at the top level of the model, not inside subsystems.
For more details, look into following documentation:
Hope this helps!