Answered
Feedback from Command/DOS window
I don't know if this old trick could work. Try system('mycommand.exe & >output.txt'). Hope all the output would be re-directed t...

7 years ago | 0

Answered
simulink model property callback
All the texts specified there are treated as code. So you could specify one line of code, or multiple lines with multiple functi...

7 years ago | 0

Answered
persistent variable simulink codegen stateflow error: "IR Construction failed"
I think IR means "Internal Representation". It might be a bug. Make a simple example and submit a service request to the Mathwor...

7 years ago | 1

Answered
Error when defining variable with if statement and add to table
the size of a, b and l is 30x1 but the size of m is 1x1

7 years ago | 0

Answered
Divide a specific element in a matrix
A.*(2*eye(3)-1)

7 years ago | 0

| accepted

Answered
Access Lookup Table Data from MATLAB command line
For example, set_param(FullBlockPath, 'Table','rand(5,5)'); web(fullfile(docroot, 'simulink/slref/block-specific-parameters.htm...

7 years ago | 1

Answered
Is there a block property that makes a Simulink block non resizable?
I wouldn't think so. The size of the block is controlled by the parameter "Position". It is [Left, Top, Right, Bottom]. If you m...

7 years ago | 0

Answered
Simulink shows NO warning when goto and from are missinig/not connected.
configuration parameters -> Diagnostics -> Connectivity -> Unconnected line

7 years ago | 1

Answered
'Layer 1' is not a valid model name because it is not a valid MATLAB function name
remove the white space. call it "Layer1" or "Layer_1"

7 years ago | 3

| accepted

Answered
How can I remove 'hide automatic names' feature permanently in simulink ?
It is just those that the default settings are not what you want. You can create your own model template. Create a Template fro...

7 years ago | 0

Answered
How to use the exist feature with an if statement?
if exist('VarName','var')

7 years ago | 0

| accepted

Answered
How to get the name of Active State in Stateflow
A typical way is to add an output to the chart. In each state, add a during action that assign this output with the value of the...

7 years ago | 0

Answered
How to duplicate the model workspace for another simulink project?
Model workspace is saved with the model. You can import and export though. In Model Explorer, select "Model Workspace", right cl...

7 years ago | 0

| accepted

Answered
concatenating even and odd rows
A=rand(10,16); B=[A(1:2:end,:),A(2:2:end,:)]

7 years ago | 0

| accepted

Answered
Does Simulink blocks data type affect simulation time?
Probably no effect. And probably causes more time since you need to resolve data type conflicts and add data type conversion. I...

7 years ago | 0

Answered
How to include a variable in "fopen" file name in a For loop?
for k=1:5 FileName=sprintf('output_matlab_%d',k) end

7 years ago | 1

| accepted

Answered
How to use boolean to control switch with fixed point data.
You set the criteria of the Switch block as u2>=1, which implies that u2 is double data type. Through back propagation, it requi...

7 years ago | 0

Answered
How can multiple data dictionaries be associated with a model?
Once you added the first one, then open it in Model Explorer. You can add "Referenced Dictionaries".

7 years ago | 2

Answered
Three step wind pattern
Use three step inputs and add them together Use FromWorkspace block, specify time and value pairs Use Signal Builder block

7 years ago | 0

| accepted

Answered
Importing data to simulink
Assume your Mx2 matrix is in base workspace and named as "B", use a FromWorkspace block and specify the value as "B". Note that ...

7 years ago | 0

Answered
num2str usage from MATLAB 5.6 to MATLAB 2014b
Not sure what happened, but all you need to do is to insert a whitespace or comma in front of all the num2str() calls. out =['n...

7 years ago | 0

Answered
Moving graphs from Simulink to Word
Go to MATLAB Preferences, Figure Copy Template to set the preferences. Use enhanced metafile to get the highest resolution.

7 years ago | 0

Answered
Can you "black box" a library?
Instead of library, you can provide a Protected Models for Model Reference

7 years ago | 0

| accepted

Answered
can't plot using user-defined function block.
Keep in mind that this MATLAB Function block is executed at every simulation step you run. Your funciton ouputs 201 values at ev...

7 years ago | 1

| accepted

Answered
Why does SIMULINK give me extra dimension?
That 51 means you have ran the simulation for 50 steps. It records your 6 values at time 0,1,... 50 steps.

7 years ago | 1

| accepted

Answered
How to create ramp?
Use "Signal Builder" block. You can move the data point to achieve your graph.

7 years ago | 0

Answered
is it possible to declare customized units for Simulink Parameters?
You can put in any string for unit in this dialog (ignore the dropdown selection list). It will be just a text for one of the pr...

7 years ago | 0

| accepted

Answered
how can choose the solver parametres?
If you hover your mouse cursor over the text (for example, Fixed-step size), a popup text give you a brief description. You can ...

7 years ago | 1

| accepted

Answered
I want to generate pulses as described in the image
Use the "Repeating Sequence" block to generate the saw tooth wave, then compare it to constant 0.5 and -0.5.

7 years ago | 0

Answered
loaded file is pathname
Increase the width of the "Value" column, you will see the full string. Or type "XMLFile" in Command Window.

7 years ago | 0

Load more