Answered
How do I switch off and on the SimMechanics 2G Mechanics Explorer from command line?
You want to type the following commands: set_param('model_name','SimMechanicsOpenEditorOnUpdate','off'); set_param('mo...

10 years ago | 0

| accepted

Answered
How to simulate out of phase of synchronous generator connected to grid
Do you have access to <http://www.mathworks.com/products/simpower/ SimPowerSystems>? There's blocks to handle all these componen...

10 years ago | 1

Answered
How to access time step in simulink model?
I wouldn't really recommend using MATLAB Function blocks to approximate derivatives, given that Simulink blocks have much better...

10 years ago | 0

Answered
Movement calculation of Solid in SimMechanics.
If you're using SimMechanics (given your tags), you could just get those quantities directly using a <http://www.mathworks.com/h...

10 years ago | 0

Answered
problem in simulation of active suspension system with actuator dynamics.
This error message happens when you put an infinite value into an Integrator block. You see how the error message points to t...

10 years ago | 1

| accepted

Answered
Implementing Model Reference, Data Dictionaries, and Buses
I would recommend placing all the bus objects in a separate data dictionary (say, |BusData.sldd|), and then referencing that dic...

10 years ago | 0

| accepted

Answered
How to build bode plot in power_PSS example case?
Looks like that Bode plot was saved as a MATLAB figure file. You can right-click the green block that says "Show Bode plot of...

10 years ago | 0

Answered
LQR issues and converting minreal gains to full-state feedback
For your first question, the full system is not controllable so LQR isn't expected to work. For the system to be controllable, t...

10 years ago | 1

Answered
What is the function behind renaming Simscape Blocks in the Simscape Results Explorer?
The rules that come into play here are not that bad, and all due to MATLAB's restrictions on variable names # Non-alphabetic ...

10 years ago | 0

| accepted

Answered
How to create a square matrix with consecutive numbers on each row?
Yeah, for sure. I'm sure there are more efficient ways to do this, but this one will show you a few examples of the "repmat"...

10 years ago | 0

Answered
Writing MATLAB function within a Simulink model - Importing external data & determining when a file was last modified
Are you planning on generating standalone code with the model, using Simulink/Embedded Coder? If you're planning on using th...

10 years ago | 0

Answered
Transform Matrix in Transform Sensor Block. SimMechanics
I'd recommend extracting the rotation angle as a quaternion instead of the transform matrix. With the extra information in the q...

10 years ago | 0

| accepted

Answered
Solving state space equation using matlab function block in simulink
If you already know the A, B, C, D matrices, why not use a <http://www.mathworks.com/help/simulink/slref/statespace.html State-S...

10 years ago | 0

Answered
Variable capacitor in Simulink
If you type "ver" in your Command Window, do you see SimElectronics in the product list? If not, and you still have Simscape,...

10 years ago | 0

Answered
How to find out gain K in root locus for stable system through MATLAB program ?
It's easier to get the Gain Margin of the system, which is the first output of the margin function: >> Gm = margin(sys) ...

10 years ago | 5

| accepted

Answered
A serious problem when calculating eigenvectors of a matrix with the function eig
The results are actually the same, but (not knowing anything about Maple and Mathematica) the formatting is different. It looks ...

10 years ago | 2

Answered
How to create this transfer function Block?
Ah, good old ramp tracking filters... If you have the Control System Toolbox, you can use an LTI System block and enter the f...

10 years ago | 0

| accepted

Answered
changing a parameter inside a continuous transfer function during simulation
Yes, it is possible. You can go right into the block and change the parameters mid-simulation. When you hit "OK" in the block...

10 years ago | 0

Answered
Frequency and amplitude of a spring damper system in simulink
The amplitude is the easier of the two to get. If you have the displacement, you can just measure the minimum and the maximum va...

10 years ago | 1

Answered
design of state machine in simulink and generation of hdl code for it
I'd start by looking at this location in the HDL Coder documentation: http://www.mathworks.com/help/hdlcoder/stateflow.html ...

10 years ago | 0

Answered
Error while running simulink
I think you might need Mass blocks, because if you have a force acting on a node with no mass to accelerate, then you get the er...

10 years ago | 1

Answered
Extract data from .PNG file
I'd recommend using the <http://www.mathworks.com/matlabcentral/fileexchange/36618-data-theif Data Theif> (yes, they misspelled ...

10 years ago | 2

Answered
In simscape lead acid battery model i want to make the initial state of charge zero what can i do for that? how I allow to write in matlab editor? i found SOC is given 0.8 but i require to make it 0.
I guess you're referring to these lines in the Simscape language components, right? outputs SOC = {0.8, '1'}; % ...

10 years ago | 0

Answered
How to make a SimHydraulic model for measuring pressure difference across a pipe section?
This is a start. The flow and pressure sensors are correctly connected in series and parallel, respectively. However, the curren...

10 years ago | 0

Answered
How to add gravitational acceleration acting on a mass that is connected to a cylinder in Simscape?
Your force source approach is the right way to model a weight. Two things I would check: # You should also attach a "Mass" bl...

10 years ago | 0

| accepted

Answered
How to plott multiple graphs with two Y-axes?
There is a "plotyy" function which lets you have two separate y-axes on the left and right sides: http://www.mathworks.com/he...

10 years ago | 1

Answered
how to represent this state space model in matlab using A,B,C,D matrix?
As soon as you introduce nonlinearities like that square root and the "sgn" function, you cannot express a system using state-sp...

10 years ago | 0

| accepted

Answered
I am having only five blocks in my simulink model but the sorted execution order is showing upto 0:10
The Ramp block is a virtual subsystem with other blocks underneath, which should have indices 0:3 through 0:9. If you right-c...

10 years ago | 1

Answered
Please provide the matlab code for optimal power flow using Gradient Method
More of an FYI, but SimPowerSystems implements this same type of power flow analysis: http://www.mathworks.com/help/physmod/s...

10 years ago | 0

Answered
I am trying to become quant.
Yep! Video: http://www.mathworks.com/videos/matlab-for-financial-applications-91012.html Course page: http://www.mathworks...

10 years ago | 0

| accepted

Load more