Community Profile

photo

Mark McBroom

MathWorks

Last seen: 1 día ago Active since 2012

Application Engineer at MathWorks

Statistics

All
  • MATLAB Central Treasure Hunt Finisher
  • Commenter
  • Promoter
  • CUP Challenge Master
  • 6 Month Streak
  • Knowledgeable Level 3
  • Revival Level 3
  • First Answer
  • Solver

View badges

Content Feed

View by

Answered
State transition table outputs printing in diagnostic viewer
Most likely this is due to a missing semicolon to terminate a MATLAB statement in your statechart.

15 días ago | 0

Answered
Why can't I create a test harness on a subsystem in a reference subsystem?
Try opening the reference subsystem model directly. You should be able to then create a test harness on a subsystem inside that ...

23 días ago | 0

Answered
Programatically set Inport/Outport Blocks as "Output as nonvirtual bus"
use find_mdlrefs() to get a list of all referenced models For each model, use find_system() to get a list of inports and outpor...

24 días ago | 0

Answered
how to add static link library to S function
When compiling and linking your s-function using the mex command, you can provide optional argument -L to link to a library. Yo...

28 días ago | 1

Answered
Combine subsystems in Simulink with continuous and discrete states
You can not set a different solver for each subsystem. The solver is defined at the model level and applies to all subsystems i...

28 días ago | 0

| accepted

Answered
How can I export my app that was created in app designer which uses simulink model to an executable format?
You need to use Simulink Compiler as described here: https://www.mathworks.com/help/slcompiler/ug/deploy-a-simulation-with-simu...

28 días ago | 0

Answered
Having trouble compiling a C code.
You need to provide both the mex C source code and your source code to the mex function: mex disloc_mex.c disloc.c Thanks....

alrededor de 2 meses ago | 0

Answered
How to use IDL sequences in Simulink DDS Blockset
Unfortunately, the DDS Blockset does not fully support sequences. Simulink will treat a sequence as a fixed length vector. The ...

3 meses ago | 0

Answered
What is the best way to distribute a custom simulink library using C++ S-Function blocks to multiple users? Preferably using some form of CI/CD pipeline
Write a MATLAB script that Uses the mex() function to compile and link source code for each S-function into a mex function ( y...

3 meses ago | 0

| accepted

Answered
Using mcc with simulink.
You should be using Simulink Compiler to compile and deploy a Simulink model. Simulink Compiler

4 meses ago | 0

Answered
Error Updating Model Reference SIM Targets (an error occured during the call to make)
The error is coming from the mingw compiler that Simulink is using to compile/link the code generated from model "machine". Do ...

4 meses ago | 0

| accepted

Answered
How to use C Caller block with C code having multiple functions ?
The C Caller block can only call one function. You can either use a seperate C-Caller block for each function, or write a wrapp...

4 meses ago | 0

| accepted

Answered
Simulink intermittently hangs after return from mdlStart() in call to external C++ sfunction
Comment out or remove your S-Function block to determine if your s-function causes the hang. If it does, then you could try to ...

4 meses ago | 0

Answered
"Generate Code Only" throws error for MATLAB block in Simulink
Code is always generated from MATLAB Function blocks and compiled into a mex function, even if you select the "Generate code onl...

4 meses ago | 0

Answered
How to dynamically change the Mask dialog box in Simulink
I am assuming the code you provided is from the "Initialization" tab? You could try putting the same code in the "callback" for...

6 meses ago | 0

| accepted

Answered
Supress Simulink Prj open dialog
Delete the mcArch_01_prj.prj file and the hidden folder .SimulinkProject

7 meses ago | 1

| accepted

Answered
Reset timer to zero after leaving a state with a transition action
There is no way to reset the simulation time. The approach you are using, which is to get simulation time when the state transi...

7 meses ago | 0

| accepted

Answered
How do you test a neural network
https://www.mathworks.com/help/stats/assess-regression-neural-network-performance.html

8 meses ago | 0

Answered
"The specified key is not present in this container" error when attempting to build a Simulink model with C Caller function blocks
The configuration should only refer to the .lib file. This is the only file needed for linking. Use double quotes around the ....

8 meses ago | 0

Answered
What approach to programming an ARM Cortex M7 on simulink?
Either can be used but I would recommend the C Caller block. For either approach, you will need to write the device driver in C...

8 meses ago | 0

Answered
Hardware specific Functions + Code Replacement + Embedded Coder
Rather than use the Code Replacement Library, a simpler approach would be to have two versions of function switch_Light(). One ...

9 meses ago | 0

| accepted

Answered
How to send data over tcp to remote server from a simulink model
The easiest way to do this is to use the UDP blocks in either the Instrument Control Toolbox or the Embedded Coder Toolbox. Oth...

11 meses ago | 0

| accepted

Answered
Enable Coverage metrics on a Simulink test suite from Matlab Script
https://www.mathworks.com/help/sltest/ref/sltest.testmanager.coveragesettings-class.html

11 meses ago | 0

Answered
How to change model properties of a .slx simulink model using the MATLAB script
Model configuration settings can be controlled from MATLAB code using the get_param() and set_param() functions. Help will tell...

11 meses ago | 0

| accepted

Answered
From Simulink to C-Code and back to Simulink
"SIL" mode addresses this use case and eliminates all of the uncessary steps you are trying to follow. SIL mode allows you to r...

11 meses ago | 0

| accepted

Answered
Executing callbacks of custom simulink blocks in a subsystem reference
I believe you need to put a mask on the subsystem reference and use this mask to pass values for each instance down into your cu...

11 meses ago | 0

Answered
PWork loses data in S-function
st1 is an autmomatic variable, so its memory location can get reused after leaving mdlStart(). YOu need to allocation memory fo...

11 meses ago | 0

| accepted

Answered
How to measure Round Trip Time in Simulink using S-Functions and Time Stamps?
Trhee suggestions Don't bother writing time to file in s-function. Use simulink logging capabilities to log the outputs from t...

11 meses ago | 0

Answered
High resolution TIFF images from Simulink Scope
Open the scope and from the File menu, select "Print to Figure". This will create a MATLAB figure of your scope. Then, from th...

11 meses ago | 0

Answered
How can I change a parameter in a Simulink block using code setVariable?
Since the variables you are trying to change are in the Model Workspace, you need to add an optional argument specifying this. ...

11 meses ago | 1

| accepted

Load more