Réponse apportée
Simulink StateFlow Variable assign
The code gets executed when entering the "Modes" state and every simulation step while the Modes state is active. To understand...

plus de 8 ans il y a | 0

Réponse apportée
How to define a 16 bit storage in simulink?
You could try using a <https://www.mathworks.com/help/simulink/slref/datastorememory.html?searchHighlight=data%2520store%2520mem...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Custom sensor library: Execute setup block before others
do you need to execute the configuration block each time "read value" block executes? If so, I use function -call trigger and t...

plus de 8 ans il y a | 0

Réponse apportée
How to process CMEX S-Function blocks with variable steps until no signal changes? (Model is interacting with TwinCAT 3)
In your design, the s-function blocks will run only once each time a pulse occurs. If you want the s-function blocks to run N t...

plus de 8 ans il y a | 0

Réponse apportée
How to determine a sim. model is being run by itself or as a referencede model?
On the "Data Import/Export" tab of the configuration settings, specify "Input" values for all input ports in the "Load from wor...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Level 2 C++ S-function not showing multiple input output ports
code looks OK. In your Simulink S-Function block, did you create a mask with 207 parameters and pass all 207 parameters in the ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to declare and use local variable in level 2 s-function?
You will need to set up a "DWork" variable that gets assigned a value in the mdlStart() function and can then be used in the mdl...

plus de 8 ans il y a | 1

Réponse apportée
Loading model into older version of Simulink
Yes, these warnings are due to a version mismatch. You can eliminate these warnings by opening the model in R2015b and then usi...

plus de 8 ans il y a | 0

Réponse apportée
Connection between two PCs with Simulink
The solution depends on whether you need real-time performance. If real-time performance is not needed, then you can run Simuli...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Stateflow code generation - how to generate void instead of static void functions?
You could try re-architecting your Stateflow code to use graphical functions. This <https://www.mathworks.com/help/stateflow/ug...

plus de 8 ans il y a | 0

Réponse apportée
How to fix gmake error 43?
Although part of the error text is not readable, it looks like problem is related to parameters used in the model. It looks lik...

plus de 8 ans il y a | 0

Réponse apportée
Problem using field of structure parameter as constant block value.
You didn't state this, but I assume that RTIP_Param is a Simulink.Parameter? If so, try using RTIP_Param.Gain1. In this case, ...

plus de 8 ans il y a | 0

Réponse apportée
How to generate static keyword on local functions
It is currently not possible to do this in Embedded Coder.

plus de 8 ans il y a | 0

Réponse apportée
Return Array Pointer with ceval
As described in the <https://www.mathworks.com/help/simulink/slref/coder.ceval.html help> , coder.ceval() can only return a scal...

plus de 8 ans il y a | 1

Réponse apportée
Using DDS with Simulink/MATLAB that isn't in the defualt installation location
Hi Eric, Currently the DDS Blockset is set up to use the same DDS libraries for both simulation and code generation, which is o...

presque 9 ans il y a | 0

Réponse apportée
Simulink: dynamic link library initialization routine failed
Simulink gives this error if any depdendent DLL's cant be found at runtime. Make sure canlib32 is on the windows path.

environ 9 ans il y a | 0

Réponse apportée
Create test harness automatically for SIL testing of a model (Embedded Coder)
Yes, test harnesses can be created from referenced models. If you have an SL V&V or SLDV license, you can use slvnvmakeharness...

environ 9 ans il y a | 0

Réponse apportée
StateFlow symbol could resolve to multiple data?
I am guessing that the duplicate symbol error is from the argument you are using for the MATLAB Function. Try changing the argu...

environ 9 ans il y a | 0

Réponse apportée
How can I multiply each bus element with a constant?
This can be done easily with a ML Function block. Code in ML Fcn Block: y = u; elemNames = fieldnames(u); for i=1:numel(el...

environ 9 ans il y a | 0

Réponse apportée
Inserting a space when printing characters using fprintf
You must have stripped out the spaces in m20 before printing. Either add spaces back into m20 before printing or change print st...

plus de 9 ans il y a | 2

Réponse apportée
Help needed!!!The function accepts two years and returns the number of days within that interval
function days = days_between_years( firstYear, lastYear ) days = 0; for i=firstYear:lastYear for j=1:...

plus de 9 ans il y a | 0

| A accepté

A résolu


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

plus de 9 ans il y a

A résolu


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

plus de 9 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 9 ans il y a

Réponse apportée
Finding period T from a square signal in Simulink
Feed signal into triggered subsystem. Configure triggered subsystem to active on rising edge. In triggered subsystem, use a Dig...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
S-functions with Legacy Code Tool (LCT) in SIL and PIL
Yes the else branch will be used for code generation, which includes SIL and PIL

plus de 9 ans il y a | 0

Réponse apportée
Error calling char variable from C code by function block of Simulink
Coder.feval can be used for simulation and code generation. The problem is that your function is supposed to return a single cha...

presque 10 ans il y a | 0

Réponse apportée
In what format does Simulink export signals?
Since the data type of the signal is double, Simulink would send 8 bytes (64 bits) representing the number in IEEE 754 format. ...

presque 10 ans il y a | 0

Réponse apportée
How do I get the SFunction builder to create an SFunction that uses a signed 64 bit integer as input/output?
If you can't migrate to 16a, then here is how you can work around it. It will require you to manually change your .c file and ....

environ 10 ans il y a | 0

Réponse apportée
How do I get the SFunction builder to create an SFunction that uses a signed 64 bit integer as input/output?
Hi Chris, It appears that there is an error in s-function builder in 15b. I was able to reproduce your problem in 15b but then...

environ 10 ans il y a | 0

Charger plus