Answered
How can I tell Simulink Embedded Coder to get its variable names from my signal names, not the source block names?
Select the signal line, right click, select "Properties" Provide the signal name (e.g. "c" ), check "Signal name must resolve t...

7 years ago | 0

Answered
How can I create a function to access substructure values?
Using dynamic field names, you don't even need the function. But if you do, it is quite simple. structName.(dynamicExpression) ...

7 years ago | 1

| accepted

Answered
Add table variable (addvars) with changing variable names
Seems no problem running the following code: clear; A=1; A1=2; A2=3; B=who('A*') T=table; addvars(T,B);

7 years ago | 0

Answered
who provided the fmu-matlab-setup scripts?
In your MATLAB, clik the "Add-ons" icon, then "Get Add-ons", search for "Tool-coupling".

7 years ago | 0

Answered
Copying a block and dynamically changing the name and sub block names.
The question is not very clear. You might be able to use gcb, gcbh, getfullname().

7 years ago | 0

| accepted

Answered
Can't run my simulation because of integrator. Error pop ups plz help!!!
You have the Clock as the input. Clock starts from zero when you start the simulation. Taking 1/u of zero results infinite.

7 years ago | 0

| accepted

Answered
How to put a char text to a existing panel
text() is to add text to an axes. use uicontrol() with "style" as "text".

7 years ago | 0

Answered
how can solve breakingpoint in simulink ?
The values in lookup_in must be monotonically increasing. Right now it is not. The third value is not regarded as larger than ...

7 years ago | 0

| accepted

Answered
Error with s-function when simulink system is called within a matlab function
You need to specify the srcworkspace as 'Parent'.

7 years ago | 0

Answered
How to use a variant sink depending on its input
I think the "Variant Sink" block is un-necessary. If you want to stop the simulation when any of the output goes nagative, then ...

7 years ago | 0

| accepted

Answered
Open a file according to text box value.
Why don't you make the push button to call [filename, pathname]=uigetfile() to select the file? Then you can use the text box to...

7 years ago | 0

Answered
Use spreadsheet time input for simulation timestep?
Theoritically you can't specify the exact simulation time as it is determined by other factors such as accuracy or tolerance. Th...

7 years ago | 0

| accepted

Answered
How to get information on a Simulink.Signal data store?
Just like you did in the script, as long as you know the Simulink.Signal object name. To get the data type: DataStore.DataType ...

7 years ago | 0

Answered
Does the Simulink State-Space block use the Matlab function "lsim"?
The Simulink State-Space block is one of the ways to specify a linear system. The simulation method (or solver) is specified in ...

7 years ago | 1

Answered
there is something in the figure that I want to be deleted
Hover over the "yellow box", left click and then press the "Delete" key It is the "Data Cursor". You can see that icon on the t...

7 years ago | 0

| accepted

Answered
How do I save a figure with the same file name as its title within a for loop?
saveas(gcf, Y{k}, 'fig')

7 years ago | 1

| accepted

Answered
Retrieving only one field in a struct
value=getfield(X,'z')

7 years ago | 0

| accepted

Answered
How to transpose a cell array converted into a character arrray?
a={'Green','Blue','Red'}; b=a'; aa=char(a); bb=char(b); isequal(aa,bb) Both aa and bb are 3x5 char array and they are ide...

7 years ago | 0

Answered
Modify cell array contents?
mat2cell(A{1},1,[2 2 2])

7 years ago | 0

Answered
Covert matrix to sub-matrices
reshape()

7 years ago | 0

Answered
Can i use the same MATLAB function in Simulink multiple times?
I would assume so. Just create that function and save it in your MATLAB path and then call it in your MATLAB Function block. You...

7 years ago | 0

| accepted

Answered
delay in Simulink Matlab function block
It looks like the Delay block in Simulink could meet your need.

7 years ago | 0

Answered
How to produce and save in a variable a list of a folder's files?
a=dir('*.mat'); b={a.name}

7 years ago | 0

| accepted

Answered
How to use "dir" command to get desired files in a folder?
dir('ign*.txt') and dir('ifs*.txt') should be able to separate them.

7 years ago | 0

| accepted

Answered
Simulink S-Function Output Ports
This is not a Simulink S-function. It is a MATLAB Function block. Anyway, as you've shown in your attached image, just explici...

7 years ago | 0

Answered
How to split vector to seqences
reshape(x,3,[]) reshape(x,[],3)

7 years ago | 0

Answered
Separately license additional toolboxes
Yes. I've done this for a long time. If you look at this document, you'll find that there are many ways to specify the license ...

7 years ago | 2

| accepted

Answered
Possible to export signal names from Simulink mux output to matlab workspace?
I would recommend that you replace all those "Mux" blocks with "Bus Creator" blocks. Then, follow this example: open_system(...

7 years ago | 2

| accepted

Load more