Risposto
Does anyone know how I can connect a matlab function block with memory block and a controlled current source?
See this How to Use Globals with the MATLAB Function Block

oltre 3 anni fa | 0

Risposto
Modify In/Output Port names with a MATLAB script
Something like this: [~,~,InPortNames]=xlsread('ExcelFileName'); % read Excel file to get PortNames as a cell array InPorts=fi...

oltre 3 anni fa | 0

Risposto
Dynamic Modeling of Wheel-track Composite Vehicle
Vehicle Dynamics Blockset has dual track model as well as wheel/tire dynamics. Not sure if this meets your need or whether you h...

oltre 3 anni fa | 0

Risposto
Is it possible to convert a referenced Configset to a regular Configset that is not referenced from an sldd?
copy, attach and setActive. similar to the example here? https://www.mathworks.com/help/simulink/slref/simulink.configsetref.ht...

oltre 3 anni fa | 0

Risposto
I noticed that some GoTo and From signals (input port no. 1) are not connected properly after the transfer (from one system to another system) of the model.
The number on top of the line indicates the size of the signal. "1" means a scalar. "2" means 1x2 or 2x1 vector. "?" means it ca...

oltre 3 anni fa | 0

| accettato

Risposto
How to achieve fan rpm with increasing step size?
The "step" increase you saw is probably determined by your lookup data and simulation step size. What you really need is proba...

oltre 3 anni fa | 0

| accettato

Risposto
Does anyone know which Simulink Block this is?
It looks like the "Fcn" block specified as "u(1)". It is used to pick out the first element. https://www.mathworks.com/help/re...

oltre 3 anni fa | 1

| accettato

Risposto
How to skip an empty value
You can use isempty(rp) to check, and then ignore as needed.

oltre 3 anni fa | 0

| accettato

Risposto
Unpack structure, only some fields
make use of fieldnames()? Avoid using the unpack() name. There is a built-in function with the same name. par.a=3.5; par.b=[4...

oltre 3 anni fa | 0

Risposto
Element wise (.*) in Simulink for two matrices with different dimensions
a=[1 2 3; 4 5 6]; b=[1; 0]; a.*b This is a change made in MATLAB in R2016b when implicit expansion is introduced. Prior to R2...

oltre 3 anni fa | 0

| accettato

Risposto
How do I fetch the linked Data Dictionaries to a Simulnik model with Commands?
There is an API. Start from here https://www.mathworks.com/help/simulink/ug/store-data-in-dictionary-programmatically.html

oltre 3 anni fa | 0

| accettato

Risposto
Delay certain subsystem in simulink
Make the subsystem a triggered subsystem. The Clock block gives you the simulation time. Compare its output to a Constant block,...

oltre 3 anni fa | 0

Risposto
Checkpoint to save the state of Simulink simulation at a specific sample time
Start from here https://www.mathworks.com/help/simulink/ug/model-operating-point-for-faster-simulation.html

oltre 3 anni fa | 0

| accettato

Risposto
How to activate the Edit-time checks under the Model advisor
on the Modeling tab, beside the "Model Advisor", click the little "down" triangle to see the "drop down list", then check or un-...

oltre 3 anni fa | 0

Risposto
Discrete Average on Simulink
See attachment. Use "window length" of "6" instead of "600" to illustrate. The build-in "Moving Average" block (it requires "DS...

oltre 3 anni fa | 2

Risposto
How to line plot the data in the Matlab?
plot(x,y,'.') is probably good enough.

oltre 3 anni fa | 1

| accettato

Risposto
How do I save a SINGLE value from the workspace?
You will have to assign that value to a temparary variable and then save it. a=rand(10,2); %save test.mat a(8,:) % this will c...

oltre 3 anni fa | 0

Risposto
Bias block not working properly with fixed point data type
fixdt(0, 12, 0) means "unsigned". The Bias block does the "Y=U+Bias" operation. The value of -1 can't be represented. If you try...

oltre 3 anni fa | 0

| accettato

Risposto
how do I write 2^-x in MatLab?
x=1; 2^(-x)

oltre 3 anni fa | 0

Risposto
Get DataType from a Simulink Consant Block (datatype is propagated from the output)
Make sure your model can pass model update (no errors). See example below: f14;%open the example model f14([],[],[],'compile')...

oltre 3 anni fa | 0

Risposto
How to clear the search terms in the search box of the library browser in Simulink?
All previously typed search terms are saved. You can double click or press-and-hold to select all, then type it over. You don't ...

oltre 3 anni fa | 0

Risposto
How to use interpolate struct data in simulink?
In general, in Simulink, the "2-D Lookup Table" block can be used to do what interp2() does in MATLAB. You need to figure out t...

oltre 3 anni fa | 0

| accettato

Risposto
Summation in MATLAB in 4 dimenstion
S = sum(X,DIM) sums along the dimension DIM

oltre 3 anni fa | 0

Risposto
Scalar variable as output of Matlab function in Simulink
In your code, you use the find() function. It could return zero, one or more results. That is why the inital error message says ...

oltre 3 anni fa | 0

| accettato

Risposto
The Simulink model is fixed-point based on floating-point numbers
No way to tell what exactly caused the problem from the snapshot of the model. In the MATLAB Function block editor, you can clic...

oltre 3 anni fa | 0

Risposto
How to use the solutions from the previous study as initial conditions in a new simulation in Simulink?
Save and Restore Simulation Operating Point

oltre 3 anni fa | 1

Risposto
Matlab Simulink command Generator Code Question
Use the "Signal Builder" block. Signal, New, Custom... Specify time-value pairs.

oltre 3 anni fa | 0

| accettato

Risposto
variation of the parameters of a diode during simulation
The value of a "parameter" of a block is designed to be constant during a simulation. There are ways to pause a simulation, chan...

oltre 3 anni fa | 0

Risposto
How to copy a subsystem block from 2019b to 2021b in simulink?
In R2019b, save your model or blocks to a file (.slx or .mdl). Then in R2021b, Open it and then save it.

oltre 3 anni fa | 0

Carica altro