Respondida
Signal Simulink from / to Workspace
The data in the first column of SigData is the time (or time step) info. It must be incremental (or non-descreasing). Based on ...

más de 5 años hace | 0

| aceptada

Respondida
Syntax Error in Simulink Fcn block
Provide values for every variable in the formula, including nb, Tfault, Tclear Provide an instance value of u Run the formula ...

más de 5 años hace | 0

| aceptada

Respondida
Operations with function handles / anonymous functions
function1 = @(x) x(1)^2+5 function2 = @(x) 2*x(2) function3=@(x) function1(x)+function2(x) function1([1 2]) function2([1 2...

más de 5 años hace | 1

Respondida
Ugrade Advisor: Where is the Update button?
Switch back to your Simulink model, press Ctrl+D to update the model. In R2020a, you will find the button in the center of the...

más de 5 años hace | 0

| aceptada

Respondida
Get full path of referenced models
ModelFile=get_param('ModelBlock','ModelFile'); File=which(ModelFile); There is no full path info saved with the Model block, b...

más de 5 años hace | 0

| aceptada

Respondida
Plotting in a specific range
index=Res(:,1)>=20; plot(Res(index,1),Res(index,3))

más de 5 años hace | 0

| aceptada

Respondida
How to delect the zero values in table
a=[1 2 3;0 0 0 ; 1 0 2]; index=all(a==0,2); a(index,:)=[];

más de 5 años hace | 0

Respondida
string variable arguments in set_param
p1x2(1,1) is cell, use p1x2{1,1} or define onOffTable = ["on","off"] if your MATLAB version support string data type

más de 5 años hace | 0

Respondida
Get Simulation Phase of Simulink Model
Check the status of a simulation. get_param('ModelName','SimulationStatus') The software returns 'stopped', 'initializing', 'r...

más de 5 años hace | 1

| aceptada

Respondida
How a Integrator followed by a saturation block is different than a limited integrator?
I think it can be explained. An Integrator followed by a Saturation. The integrator just does its regular integration and the ...

más de 5 años hace | 0

Respondida
How to solve a system of ODE in Simulink?
If the model has already been developed in MATLAB, you could use the MATLAB Function block

más de 5 años hace | 0

Respondida
Join two sprintf into one and show it on static field
The second set(handles.text3, 'string',...) will over-write the first one. You need to combine the string and run set() once. ...

más de 5 años hace | 0

Respondida
How can I divide plot between different scope windows in a scope block?
You have to specify 2 input ports, Mux three and feed into port 1, Mux the other three and feed into port 2.

más de 5 años hace | 0

| aceptada

Respondida
Add missing numbers between elements in an array
%% Var1= [1 1 2 4 5 7 7 7 8 10 11 13 14 14 17 17 17 17 18 20]; Var2= [0.5 0.3 0.1 0.6 0.2 0.4 0.8 0.9 0.3 0.2 0.1 0.4 0.8 0.7 ...

más de 5 años hace | 0

| aceptada

Pregunta


Is there a way to "Save" a link to a MATLAB Answer?
I saw a question. I know the answer because I remember answering a similar one before and it was accepted. But the answer is le...

más de 5 años hace | 1 respuesta | 2

1

respuesta

Respondida
extract all points from curves
x= [1,2,3,4,5,6,7,8,9,10] y= [1,2,3,4,5,6,7,8,9,10] in=[1.2,2.3,3.5] out=interp1(x,y,in)

más de 5 años hace | 0

| aceptada

Respondida
How to run Simulation for certain amount of time
Specify the start time and stop time either directly through numerical value, or through variables and then set the value for th...

más de 5 años hace | 1

| aceptada

Respondida
How can I reset the time reference in a triggered subsystem in Simulink?
This turns out to be harder that it seems. Branch and connect the trigger signal to the external reset port of a resetable Int...

más de 5 años hace | 0

| aceptada

Respondida
When using the 'set_param' function, how do I ensure that I format the parameter value properly when the parameter value is a 1xn array?
how about this a=1;b=2;c=3 mat2str([a,b,c]) ans = '[1 2 3]'

más de 5 años hace | 0

| aceptada

Respondida
Read specific value from XML-file
The short answer is to use xmlread(). I've done it before. The actual code depends on the schema. You may also try xml2struct()...

más de 5 años hace | 0

Respondida
Matlab zoom window behavior in recent years
That is true but I think there is a benefit. It allows you to do x-only or y-only zoom easily. Regarding zoom outside of the li...

más de 5 años hace | 1

Respondida
Start/Stopp in one Button
For fun, one-liner uibutton('Text','Start','ButtonPushedFcn','set(gcbo,''text'',setdiff(["Start","Stop"],get(gcbo,''text'')))')...

más de 5 años hace | 0

Respondida
Log simulink (variable step) data with with one sample time!
You can always specify the sample time of the data logging (ToWorkspace block or signal logging). Keep in mind though that this ...

más de 5 años hace | 1

| aceptada

Respondida
Access Data in to APP DESIGNER from Simulink 'To Workspace' block.
Use set_param() to set 'SimulationMode' and then still run simout = sim("AppDesignSetup.slx") so it will force the log of si...

más de 5 años hace | 0

Respondida
How to replace one subsystem with other ..
replace_block() see examples in doc

más de 5 años hace | 0

| aceptada

Respondida
How do I evaluate string user input with switch statement?
input('This is a prompt [y/n]','s') to input a string. Otherwise, it is for numerical.

más de 5 años hace | 0

| aceptada

Respondida
From workspace block error: Time values must be a real vector.
If you are using timeseries, make sure its time data is valid. For example Var=timeseries; Var.Time=[0;1]; Var.Data=[1;100] ...

más de 5 años hace | 0

Respondida
how to zoom in
axis()

más de 5 años hace | 0

Respondida
i want to obtain a vector that each element is subtract from the previous one
diff()

más de 5 años hace | 1

| aceptada

Respondida
Disable Drag and Drop
Search "how to disable drag and drop in windows" and see the steps. I assume the same risk exists in other apps if it happens to...

más de 5 años hace | 0

Cargar más