답변 있음
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...

대략 8년 전 | 0

답변 있음
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...

대략 8년 전 | 0

| 수락됨

답변 있음
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...

대략 8년 전 | 0

답변 있음
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...

대략 8년 전 | 0

답변 있음
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...

대략 8년 전 | 0

| 수락됨

답변 있음
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 ...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 1

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

| 수락됨

답변 있음
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...

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 0

답변 있음
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, ...

8년 초과 전 | 0

답변 있음
How to generate static keyword on local functions
It is currently not possible to do this in Embedded Coder.

8년 초과 전 | 0

답변 있음
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...

8년 초과 전 | 1

답변 있음
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...

8년 초과 전 | 0

답변 있음
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.

거의 9년 전 | 0

답변 있음
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...

거의 9년 전 | 0

답변 있음
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...

거의 9년 전 | 0

답변 있음
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...

거의 9년 전 | 0

답변 있음
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...

9년 초과 전 | 2

답변 있음
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:...

9년 초과 전 | 0

| 수락됨

문제를 풀었습니다


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...

9년 초과 전

문제를 풀었습니다


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 ...

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

답변 있음
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...

9년 초과 전 | 0

| 수락됨

답변 있음
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

9년 초과 전 | 0

답변 있음
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...

거의 10년 전 | 0

답변 있음
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. ...

거의 10년 전 | 0

답변 있음
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 ....

거의 10년 전 | 0

답변 있음
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...

거의 10년 전 | 0

더 보기