Answered

How to start a simulation in steady-state ?

In Configuration Parameters, Data Import/Export, you can check and specify "Initial State". You can also save "States" for you...

How to start a simulation in steady-state ?

In Configuration Parameters, Data Import/Export, you can check and specify "Initial State". You can also save "States" for you...

19 days ago | 0

Answered

'keyboard' calls fail outside try..catch when try..catch contains a keyboard call

There is no problem running the code in R2020a. run "which -all keyboard" to see if there are other function called keyboard D...

'keyboard' calls fail outside try..catch when try..catch contains a keyboard call

There is no problem running the code in R2020a. run "which -all keyboard" to see if there are other function called keyboard D...

19 days ago | 0

| accepted

Answered

How to make recursion faster in Matlab (Matlab seems to forget steps already done)?

You might not need to use recursive function to get the solution. Instead, just calculate the result as a nxn matrix, but, it ne...

How to make recursion faster in Matlab (Matlab seems to forget steps already done)?

You might not need to use recursive function to get the solution. Instead, just calculate the result as a nxn matrix, but, it ne...

19 days ago | 0

Answered

How to make recursion faster in Matlab (Matlab seems to forget steps already done)?

The code can be simplified first. I see the potential saving. f(a,1,20) depends on f(a,2,20) and f(a,1,19), which depends on f...

How to make recursion faster in Matlab (Matlab seems to forget steps already done)?

The code can be simplified first. I see the potential saving. f(a,1,20) depends on f(a,2,20) and f(a,1,19), which depends on f...

20 days ago | 0

Answered

Simulink simulation to confirm the change of a state after n number of cycles

Use a "Detect Change" block and a "Counter" block. If no change is detected for "Nb_cycles" times, the output is ture, otherwis...

Simulink simulation to confirm the change of a state after n number of cycles

Use a "Detect Change" block and a "Counter" block. If no change is detected for "Nb_cycles" times, the output is ture, otherwis...

20 days ago | 0

Answered

Problem with Controlled voltage source

In ideal circuit, connecting a capacitor in pararell with a voltage source would short-circuit the voltage source (when initiall...

Problem with Controlled voltage source

In ideal circuit, connecting a capacitor in pararell with a voltage source would short-circuit the voltage source (when initiall...

20 days ago | 1

| accepted

Answered

Sizeof error and Z is a scalar/Vector but needs to be matrix

sizeof() is not a function. Maybe you want to use ndims()

Sizeof error and Z is a scalar/Vector but needs to be matrix

sizeof() is not a function. Maybe you want to use ndims()

20 days ago | 0

Answered

Can I access the Unit of a Simulink.Parameter in a Mask?

Yes but it is not very elegant. "INPUTPARAM" is the name of your mask variable. You have to follow that to get the name of the...

Can I access the Unit of a Simulink.Parameter in a Mask?

Yes but it is not very elegant. "INPUTPARAM" is the name of your mask variable. You have to follow that to get the name of the...

21 days ago | 0

| accepted

Answered

Error using cos.Not enough input arguments.

try this line by line y=pi (cos(y))^2 cos^2*y

Error using cos.Not enough input arguments.

try this line by line y=pi (cos(y))^2 cos^2*y

26 days ago | 0

| accepted

Answered

How i convert a phrase like;(_x_1, or %diff) into a valid matlab variable? That i need to create a function?

If just want to create a valid MATLAB variable name, genvarname('_x_1') genvarname('%diff') matlab.lang.makeValidName('%diff'...

How i convert a phrase like;(_x_1, or %diff) into a valid matlab variable? That i need to create a function?

If just want to create a valid MATLAB variable name, genvarname('_x_1') genvarname('%diff') matlab.lang.makeValidName('%diff'...

26 days ago | 0

| accepted

Answered

Trying to plot a step response of a given transfer function.

You probably meant tf1=p21. p2 itself is improper. I assume you know what it means in control theory.

Trying to plot a step response of a given transfer function.

You probably meant tf1=p21. p2 itself is improper. I assume you know what it means in control theory.

27 days ago | 1

| accepted

Answered

How to add ground and terminator in protected model

That is why it is called "proteted mode", right? There are different level of protection. You may be able to read-only the model...

How to add ground and terminator in protected model

That is why it is called "proteted mode", right? There are different level of protection. You may be able to read-only the model...

27 days ago | 0

Answered

Looping a simulink model for multiple time-input

load F.mat % attached % a matrix of F is loaded, it is a 512x201 double array p=size(F,2) % number of columns for n=1:2 % for...

Looping a simulink model for multiple time-input

load F.mat % attached % a matrix of F is loaded, it is a 512x201 double array p=size(F,2) % number of columns for n=1:2 % for...

27 days ago | 0

| accepted

Answered

Unable to print image of Subsystem in Simulink model in 2016b

In R2016b, it seems that the Subsystem needs to be open first. Add a line open_system() first.

Unable to print image of Subsystem in Simulink model in 2016b

In R2016b, it seems that the Subsystem needs to be open first. Add a line open_system() first.

27 days ago | 0

| accepted

Answered

can anybody help me with this error,load a file in workspace and ruleviewer

screen capture is hard to read. But the error seems to be that there are still parameters that are not set in base workspace. Ar...

can anybody help me with this error,load a file in workspace and ruleviewer

screen capture is hard to read. But the error seems to be that there are still parameters that are not set in base workspace. Ar...

28 days ago | 0

Answered

Matlab not able to finalise running a script for a Simulink model

The warning messages are non-critical. It indicates some signals are "sent" but not used anywhere. Might it be that computer c...

Matlab not able to finalise running a script for a Simulink model

The warning messages are non-critical. It indicates some signals are "sent" but not used anywhere. Might it be that computer c...

28 days ago | 0

Answered

Non Finite Derivative for Integrator Block

Most often this is caused by the ideal Derivative block. You have three in the model, two of them are in series. Comment out al...

Non Finite Derivative for Integrator Block

Most often this is caused by the ideal Derivative block. You have three in the model, two of them are in series. Comment out al...

28 days ago | 0

Answered

Display the final value of a variable of a plot in figure window

something like this %% a=17.63*3.6; i=0:0.5:18 a=a*i; plot(i,a,'linewidth',1); hold on; %% offset=10...

Display the final value of a variable of a plot in figure window

something like this %% a=17.63*3.6; i=0:0.5:18 a=a*i; plot(i,a,'linewidth',1); hold on; %% offset=10...

28 days ago | 0

| accepted

Answered

Start simulink simulation from cetrain time

See these set_param('vdp','SimulationCommand','start') set_param('vdp','SimulationCommand','pause') set_param('vdp','Simulati...

Start simulink simulation from cetrain time

See these set_param('vdp','SimulationCommand','start') set_param('vdp','SimulationCommand','pause') set_param('vdp','Simulati...

1 month ago | 0

| accepted

Answered

How can i import a signal and make its frequency as an input parameter.

Your data has 101 points (or 100 intervals). The period of the signal is 1/F, where F is your frequency. So you need to do Data...

How can i import a signal and make its frequency as an input parameter.

Your data has 101 points (or 100 intervals). The period of the signal is 1/F, where F is your frequency. So you need to do Data...

1 month ago | 0

Answered

How am I using set wrong?

setfield(foo,'fieldName1',bar.fieldName2)

How am I using set wrong?

setfield(foo,'fieldName1',bar.fieldName2)

1 month ago | 0

| accepted

Answered

How to set value of Simulink Rocker Switch from Matlab

This is a Simulink Dashboard block. It needs to be "binding" with another block. Add a Constant block of value "1". Bound the R...

How to set value of Simulink Rocker Switch from Matlab

This is a Simulink Dashboard block. It needs to be "binding" with another block. Add a Constant block of value "1". Bound the R...

1 month ago | 0

| accepted

Answered

Simulink Block vs Simulink Model

A Simulink model is made from Simulink blocks. The sum of all its Simulink blocks plus something else (configurations, parameter...

Simulink Block vs Simulink Model

A Simulink model is made from Simulink blocks. The sum of all its Simulink blocks plus something else (configurations, parameter...

1 month ago | 1

Answered

Compare data at consecutive timesteps during runtime in Simulink

Use a Unit Delay block, the input is altitude, the output is the "previous value" of the altitude.

Compare data at consecutive timesteps during runtime in Simulink

Use a Unit Delay block, the input is altitude, the output is the "previous value" of the altitude.

1 month ago | 0

| accepted

Answered

Testsuite for Matlab 2011b?

For many common cases, using the Signal Builder block to provide the testing signals/vectors is sufficient. You can create multi...

Testsuite for Matlab 2011b?

For many common cases, using the Signal Builder block to provide the testing signals/vectors is sufficient. You can create multi...

1 month ago | 0

| accepted

Answered

License problem on my account

check your eligibility https://www.mathworks.com/products/matlab-online.html#license-types

License problem on my account

check your eligibility https://www.mathworks.com/products/matlab-online.html#license-types

1 month ago | 1

Answered

Sending Live Simulink Values To Gui

Instead of creating your own GUI, I would suggest using the Simulink Dashboard Blocks. https://www.mathworks.com/videos/dashbo...

Sending Live Simulink Values To Gui

Instead of creating your own GUI, I would suggest using the Simulink Dashboard Blocks. https://www.mathworks.com/videos/dashbo...

1 month ago | 1