Respondida
What is the Matlab code that connects a variable to a Slider Switch Block?
The 'binding' needs to be a block in the model. If that block uses 'A' as a parameter and that parameter is selected to be bound...

11 meses hace | 1

Respondida
[Linux] Error in MatlabWindow after upgrading Ubuntu from 20.04 to 22.04
According to this, up to Ubuntu 18.04 LTS is supported by MATLAB R2018b. https://www.mathworks.com/content/dam/mathworks/mathwo...

11 meses hace | 0

Respondida
Force default datatype to single in undefined Simulink blocks
'DefaultUnderspecifiedDataType' is not the same as 'Default DataType'. Your setting only applies to the Constant block because i...

11 meses hace | 0

| aceptada

Respondida
How do I get the relative error between 2 signals in Simulink?
Assume x and y are the two signals, you are doing abs((x-y)/x) or abs((x-y)/y), when x or y is close to zero, it will cause di...

11 meses hace | 1

| aceptada

Respondida
Tally Instances of Negative Numbers in an Array (for loop)
A=load() returns A as a structure, not a typical matrix. If you make A an matrix, this code would work if you make the following...

12 meses hace | 0

Respondida
isnan to conver nan to zero in a table
T is an object of the class "table". You can't apply isnan() on it directly. Try the 'TreatAsMissing' option of the readtable() ...

12 meses hace | 0

Respondida
Is there a way to extract a list from "PV Array.ModuleName.Enum" to view the solar module data more efficiently?
Should be BlockDialogParameters.ModuleName.Enum or getfield(BlockDialogParameters.ModuleName,'Enum')

12 meses hace | 0

Respondida
Plot RGB triplets from a matrix as markers 'o'
Use 'color' to specify color in plot() x = linspace(0,10,10); y = linspace(0,10,10); xlabel('X-axis'); ylabel('Y-axis'); ax...

12 meses hace | 0

Respondida
What is the max number of digits allowed for a base 2 number?
The default data type in MATLAB is "double", which means 64 bits. When used to represent a base 2 number, its maximum value is 2...

12 meses hace | 0

Respondida
How to set Simulink block parameters using an absolute model path
The "absolute model path" of a block starts with the name of the model, not including the file folder where the model file is st...

12 meses hace | 0

| aceptada

Respondida
How to output text to Command Window if signal changes from 0 to 1 in Simulink
You might want to do that, but MATLAB and Simulink are quite different. I don't think you can do that because disp() or fprint...

12 meses hace | 0

Respondida
I can't download Matlab R2022a release or earlier release
I can see many versions on this link. https://www.mathworks.com/downloads/

12 meses hace | 0

Respondida
How to change const variable during simulink runtime
While the simulation is running, if you double click the Constant block, change its value from one numeric value to another (e.g...

alrededor de 1 año hace | 0

Respondida
Initial condition from external source for discrete integration diuring runtime
The value of "mec_init_pos" could be constant or dynamic, but in this case, only its value at the begining of the simulation (e....

alrededor de 1 año hace | 1

| aceptada

Respondida
Function Call Trigger Problem
This "Outport" block seems to output a function call trigger. The message tells you what type of block can receive this signal. ...

alrededor de 1 año hace | 0

Respondida
A few basic Simulink/Simscape questions
run forever (tstop = inf) Yes. Set the simulation stop time to be inf store the trailing 10000 points Yes. Limit the data poi...

alrededor de 1 año hace | 0

| aceptada

Respondida
How the Delay one step block and stop time ( simulation time) infuence each other on simulink?
If you don't specify the step size or it is auto, the step size is automatically adjusted, influnced by simulation stop time and...

alrededor de 1 año hace | 0

Respondida
Simulink model output heavily dependent on relative tolerance
Not typical but is for a stiff system. Choose a stiff solver. https://www.mathworks.com/help/matlab/math/solve-stiff-odes.html

alrededor de 1 año hace | 0

Respondida
Issue in creation of test harness of a Simulink state in stateflow or creation of harness of a subsystem present in simulink state of stateflow.
I don't think a "system under test" can be a "state" in a state chart. A typical "system under test" has inputs, while a "state"...

alrededor de 1 año hace | 0

Respondida
Generate signal according to the the rising edges of two pulse generators in simulink.
A triggered subsystem shoud suffice. https://www.mathworks.com/help/simulink/slref/triggeredsubsystem.html

alrededor de 1 año hace | 0

Respondida
Matlab & Simulink crash at 2nd model run
After first run, execute "clear mex" or "clear functions" in MATLAB Command Window to see if it makes a difference.

alrededor de 1 año hace | 0

Respondida
Avoid reuse of local variables in Embedded coder
That is probably not the correct option. You should try to disable the "Reuse local block outputs" option. https://www.mathwor...

alrededor de 1 año hace | 0

Respondida
Switch multiport switch inputs based on time and order from user
There are many ways to do it. The easiest or most flexible way to do it is probably by using a MATLAB Function block. Use a Cloc...

alrededor de 1 año hace | 0

Respondida
Attempting to turn off Dynamic Memory allocation but struggling to set variable size upper bound
Try allocating the variable in one shot, e.g. obj=struct('x',num2cell(rand(1,1000)))

alrededor de 1 año hace | 0

Respondida
Can one Function call Trigger Multiple Subsystems?
Function-Call Split https://www.mathworks.com/help/simulink/slref/functioncallsplit.html

alrededor de 1 año hace | 0

| aceptada

Respondida
运行s-function Output argument "sys" (and possibly others) not assigned a value in the execution with "ctrl>mdlOutputs" function.
Probably a typo at the last line of this code below. Should be 'sys', not 'sym'. Also need to add a line 'end' to finish this fu...

más de 1 año hace | 1

| aceptada

Respondida
my for loop stop after the first valid number has been found how do i fix this
Use "result_1", no need to create "answer_1" numbers=1:100; result_1=[]; for i =1:numel(numbers); num=numbers(i); i...

más de 1 año hace | 0

| aceptada

Respondida
hi i started the matlab onramp course and im stuck on this further practice question i wld appreciate if anyone cld help me or even give an hint
density=10:10:100 index=[1 3 6] SelectedDensityValue=density(index)

más de 1 año hace | 0

Respondida
Questions regarding Unit Delay block initial condition and model recompilation
Use Simulink.Parameter Specify its storage class as "ImportFromFile" and specify a HeaderFile name. When the code is generated...

más de 1 año hace | 0

Cargar más