Answered
How can I specify publish and subscribe rate for ros topics using Simulink?
You can use an Enabled Subsystem which is controlled via the "IsNew" output of the subscriber block. Basically, the code inside ...

11 years ago | 1

| accepted

Answered
How can I retrieve the names of all the blocks in a sim-mechanics model?
*NOTE:* I am assuming SimMechanics second generation. For first generation, the same stuff below works, but the names are a bit ...

11 years ago | 0

| accepted

Answered
2014a OR 2014b OR 2015a Which version is better?
If you don't have any requirements on MATLAB versions (i.e. standardizing on version for collaboration), there's no reason why y...

11 years ago | 0

Answered
Sequentially add figures to a word document using Report Generator
What I've done in my work is save the figure as an image and add it to my report. Furthermore, you can pick the title text from ...

11 years ago | 2

Answered
Converting values to 0 and 1 and then counting occurrences!
Suppose your original data is named |x|. The following line will create a matrix the same size as your original, where the eleme...

11 years ago | 3

Answered
How to write _ in a plot title?
Just put a backslash in front of it: |\_| - Sebastian

11 years ago | 9

| accepted

Answered
SimHydraulics capability modelling water hammer effects in deep water environment
You can model the Water Hammer effect by ensuring there are Fluid Inertia blocks in your model. The simplest way to do this is w...

11 years ago | 1

| accepted

Answered
Using Polyfit in Simulink
Did you try double-clicking the Display block and changing the Format options? The default is "short", which may not show the sm...

11 years ago | 0

Answered
Significance of solver type "Tustin" or "Backward Euler" in Powergui
Tustin and Backward Euler are two different ways of discretizing a continuous-time system. So, when you change your solver type ...

11 years ago | 2

Answered
How to get state vector from the State-space block in Simulink?
I don't believe there's a direct way to access the states unless you re-implement the state-space block yourself with matrix mul...

11 years ago | 5

| accepted

Answered
How can I set a block parameter dynamically during simulation? (e.g. with workspace variable)
What does that "height" variable reference? If it's inside SimMechanics blocks, then that value cannot be changed mid-simulation...

11 years ago | 0

| accepted

Answered
Calling a signal from matlab workspace to simulink
There are quite a few ways -- this page in the documentation describes them pretty well: http://www.mathworks.com/help/simuli...

11 years ago | 0

Answered
how to connect PMSG wind turbine through step up transformer to 30 km transmission line?
You can look at SimPowerSystems examples like this one: http://www.mathworks.com/help/physmod/sps/examples/wind-farm-synchron...

11 years ago | 0

| accepted

Answered
How can I link a data dictionary to a Simulink block library?
That's a tricky one... I can think of one solution that could potentially work, but would require R2015a since this is where the...

11 years ago | 0

Answered
How to Time Shift a waveform to left in simulink?
What is the waveform generated from? Some of the standard Source blocks let you control the phase which could left-shift your si...

11 years ago | 0

Answered
Integrate Simulink + GUI: Attempt to reference field of non-structure array.
I would check a few things to narrow down the problem. First off, do you have access to the |ScopeData| variable inside that...

11 years ago | 0

Answered
How can I change LineWidth of all lines in a printed figure from Simulink?
The documentation refers to |simplot| as being replaced with |Simulink.sdi.view|, which brings up the <http://www.mathworks.com/...

11 years ago | 1

Answered
Writing equation in Simscape
Well, you have 4 total variables: |V| and |i| inherited from the branch, and your additional custom variables |q| and |w|. By...

11 years ago | 0

| accepted

Answered
color the specific simulink block
You can enter >> blockName = 'testModel/input1'; >> set_param(blockName,'BackgroundColor','green'); By the way, you c...

11 years ago | 0

| accepted

Answered
Equivalent ActiveX Code for xlsread
This link might help: http://www.mathworks.com/help/matlab/matlab_external/example-reading-excel-spreadsheet-data.html - S...

11 years ago | 0

Answered
How to define and output signals in array form from stateflow chart ?
Given the syntax you are using, I'm assuming you are using the C action language. In that case, I see 2 syntax errors in that st...

11 years ago | 0

| accepted

Answered
what does Resolve link and break link do?
First off, here's the documentation resource: http://www.mathworks.com/help/simulink/ug/working-with-library-links.html When ...

11 years ago | 1

| accepted

Answered
What happens inside Simscape nodes
Simscape uses a generalized version of Kirchhoff's Circuit Laws. In the diagram you showed, those 3 nodes are actually the same ...

11 years ago | 1

| accepted

Answered
I would like to calculate the Energy for 3 days values.
Luckily, your Excel data is formatted ready for loading into Simulink. First, you can read the data into MATLAB using the |xl...

11 years ago | 0

Answered
how to apply PID controller on dynamic system in state space form? example please
You can create a PID controller using the |pid| function: http://www.mathworks.com/help/control/ref/pid.html Then, you can...

11 years ago | 1

Answered
How can i get a model argument from the modelworkspace into a matlab skript?
wksp = get_param(mdl,'ModelWorkspace') value = wksp.getVariable('K') ... where "mdl" is your model's name :) - Sebast...

11 years ago | 0

| accepted

Answered
Model with multiple data dictionaries
This is a safety mechanism in data dictionaries such that you can't accidentally modify one variable, but not the other. The bes...

11 years ago | 2

Answered
Some Constant blocks not tunable in Simulink External Mode
Are those constant blocks using hard-coded numerical values or are they variables (either numeric or |Simulink.Parameter| object...

11 years ago | 0

Answered
List of Files on a folder
To make a dialog box, you can use the |uigetdlg| function: dirName = inputdlg('Enter value here:') Then, whatever is ret...

11 years ago | 0

Answered
How to simulate a SS model with parametric sampling time?
Assuming you have Control System Toolbox and you already made your matrices A, B, C, D, you can package them up into a state-spa...

11 years ago | 0

Load more