Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

10 månader ago

Solved


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

10 månader ago

Solved


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

10 månader ago

Solved


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

10 månader ago

Solved


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

10 månader ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

10 månader ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

10 månader ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

10 månader ago

Solved


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

10 månader ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

10 månader ago

Answered
How to create a .dll from a .slx?
Do you get any error messages? Make sure you don't have the "generate code only" box checked. Thanks. Mark.

11 månader ago | 0

Answered
Overwriting default mex compiler flags via Simulink C-Caller block
One approach you could try is to compile your external C++14 code into it's own library outside of MATLAB/Simulink using g++ wit...

11 månader ago | 0

Answered
MATLAB Coder - generate code but build separately?
The con for this approach is that you may have to adjust your build process if the names of .c or .h files change due to changes...

11 månader ago | 0

| accepted

Answered
wANTED TO GENERATE C CODE OF SIMULINK
This looks like a code generation error for the GPIO block. I recommend sending Simulink model and error message to support@mat...

ungefär ett år ago | 0

Answered
Best way to wrap C++ library to be used in MATLAB, Simulink, and others?
For both Simulink and MATLAB, it is easiest to first compile your C++ code into a library, then use the following approaches for...

ungefär ett år ago | 1

| accepted

Answered
Warning: Name is nonexistent or not a directory in code generation
Did you enter info in the "Include Headers", "Include directories" and "Source Files" sections of the custom code dialog? In Th...

ungefär ett år ago | 1

Answered
SIL testing with user defined function.
You need to add the function prototype for _mm_loadu_pd to your user defined C file ( or a #include to a header file that define...

mer än ett år ago | 0

Answered
Simulink Switch Block Input Calculation
Embedded coder attempts to pull upstream calculations inside the if-then C++ code generated for a switch block. However, to ens...

mer än ett år ago | 0

| accepted

Answered
Define global variables for MATLAB function usage within Simulink for Embedded Code
Did you follow the steps as described here? https://www.mathworks.com/help/simulink/ug/using-global-data-with-the-matlab-functi...

mer än ett år ago | 0

Answered
How can I avoid function duplication in code generation?
You need to move your code from the Start() TLC function to the BlockTypeSetup() TLC function. The BlockTypeSetup() TLC functio...

mer än ett år ago | 0

Answered
I have generated C code using embedded coder but few files are missing in the folder e.g. math.h
Use the "Package code and artifacts" configuration open to run the PackNGo tool that will identify all needed source and header ...

mer än ett år ago | 0

Answered
How to open matlab project (.proj) in the background using -batch command from bash?
use openProject() function to do this. https://www.mathworks.com/help/matlab/ref/openproject.html

mer än ett år ago | 0

Answered
simulink unable to pace at specified rate
Accelerator and rapid accelerator modes can be used to increase the simulation speed, but these options are not likely to get yo...

mer än ett år ago | 1

Answered
Run Simulink R2014b model in R2022b version
Theoretically you can open a model from an older release and it should open and run. The upgrade advisor https://www.mathworks....

mer än ett år ago | 0

Answered
Share a state variable between 2 masked S-Function
It is not possible to have an S-Function update the value of data dictionary value. See this link for approaches you can take...

mer än ett år ago | 0

| accepted

Answered
How to return array from imported C++ code in C function block in Simulink?
Why is your C++ code deailing with mxarray? The whole point of the C Function block is that behind the scenes it will generate ...

mer än ett år ago | 0

Answered
How to find enumeration usage in simulink model
I believe the dependency analysis feature of SImulink Projects will do this for you. You will first have to set up a Simulink P...

mer än ett år ago | 0

| accepted

Answered
How to connect Raspberry Pi to DAC MCP 4921 using SPI Simulink blocks?
Would you want to use the SPI Read/Write/Master blocks to communicate with this external device, similar to this example that us...

mer än ett år ago | 1

Answered
TI C2000 F28379D support package: Mathworks implementation of IPC and how to interface with hand-code ?
Rather than trying to write the IPC code for your hand-written application, a better approach might be to creaet a Simuilnk mode...

mer än ett år ago | 0

Answered
Converting Aerospace blockset's Gyro model to a C code with Simulink Coder
Integrating generated code from a Simulink model into another application is fairly simple. When you generate code for your sim...

mer än ett år ago | 1

Load more