Answered
Runge kutta 4th order method for Fitzhugh Nagumo model
Do you need to use x on the first line in the eq1 function that calls FN?

4 years ago | 0

| accepted

Answered
How to generate sample Randomly in Matlab
>> output = randn(1,4000); >> size(output) ans = 1 4000

4 years ago | 0

Answered
(R2021b) Simulink/Embedded Coder : Not able to disable Stateflow states data logging
The generated code will not log any data as it would in Simulink. Here is the relevant documentation from the Embedded Coder Us...

4 years ago | 0

Answered
How can I create a matrix from a vector with the vector indices given in a matrix, without using a loop?
If you can add an entry to v to handle the creating of the zero entries in A, it can be pretty elegant. First make A as a vecto...

4 years ago | 1

Answered
Is there a way to create a custom model compare tool report that zooms into subsystems and screen captures the changes made between two models?
The programs mldiff.exe and mlmerge.exe are designed for this purpose. They are provided with MATLAB.

4 years ago | 0

Answered
Simulink: 'getDegaultValue' method for custom enumeration does not work
Simulink cannot use MATLAB enumerated class types. Instead you need to define the enumeration in a data dictionary as a Simulin...

4 years ago | 0

| accepted

Answered
'Too many output arguments' when starting a new simulink script
If you have a file called untitled.m or untitled.slx or untitled.mdl on your system, remove it.

4 years ago | 1

| accepted

Answered
Change derivative in simulink
You can use principals of calculus to differentiate a function and then implement the derivative in blocks in Simulink. For exa...

4 years ago | 0

Answered
I need to implement state space equation AX+BU in which A & B are matrix with variable parameters. How to implement it in Simulink?
The Control System Toolbox has a Discrete Varying State Space block and a version for Continuous time. These accept as inputs v...

4 years ago | 1

| accepted

Answered
Save all figures using figure title error
The figure handle has some properties that may be useful, including Name, Number, and NumberTitle. figure, plot(1:10,2:2:20);...

4 years ago | 0

| accepted

Answered
Receiving NaN when using iradon function
You can use max(max(isnan(xe))) to check if any variables created while running your code have a NaN. Looking through them afte...

4 years ago | 0

Answered
I Wrote a Code For Fast Fourier Transformation With a Sin Function
Looks correct. The amplitude of your input signal is divided between the left and right half of the output. Type the command "...

4 years ago | 1

| accepted

Answered
Select specific points in a figure before continuing a for loop
There is ginput or rectangle if you are looking to click on the plot and get points or rectangle properties returned to use in s...

4 years ago | 0

| accepted

Answered
Assign dates with number
See the help article "Dates and Time" for information about working with dates and times in MATLAB. There is a function called ...

4 years ago | 0

Answered
how can i avoid this error in the breaker block ?
Does it work if you run the original example without changes? You do not change the timestep which is set to variable with max ...

4 years ago | 0

| accepted

Answered
How to end an indefinite loop?
sscanf and textscan can process a string with multiple entries for T into a vector if that is a better solution for you

4 years ago | 0

Answered
Mask s-function with datatype selector and register datatype in s-function
Busses are treated a lot differently as Simulink marshals data to pass to or from an S-Function. So what you are describing can...

4 years ago | 0

Answered
Plot the regular function and Fourier transform
y for the first plot would be the rectangular pulse value. x would be the range -10 to 10. For the plot of the fourier transfo...

4 years ago | 0

| accepted

Answered
Any way to send output (vibration) to game controller?
If you are talking about Simulink, you can use legacy code tool or S-Function build to create an S-Function wrapping any C/C++ c...

4 years ago | 0

Answered
When generating an s-function from a simulink block, can I select fields within an input structure to make them tunable parameters which show up within the s-functions mask?
It seems possible, according to this article in the Mathworks documentation, "Organize Data into Structures in Generated Code". ...

4 years ago | 0

| accepted

Answered
Is it possible to apply imdilate and imerode to a signal and not an image?
Yes, it is. As shown here, the flag structuring element adds a value of one on each side of the pulse in this test: >> se1...

4 years ago | 1

Answered
I want to implement all possible 2*2 or 3*3 or n*n matrices by using 0 or/and 1 as their elements.
Looks like 16 combinations of 4 values for the 2x2, and 2^9 combinations of 9 values for the 3x3. Try using dec2bin and reshape...

4 years ago | 0

Answered
Solution of Quadratic Matrix Equation
You could look at this work on File Exchange: https://www.mathworks.com/matlabcentral/fileexchange/26956-solve-bilateral-matr...

4 years ago | 0

Answered
Solution of Quadratic Matrix Equation
icare and idare are used to numerically solve the continuous or discrete forms of the Riccati equation.

4 years ago | 0

Answered
Trying to produce a proper pdf, cdf and histogram from data
You could use the Curve Fitting Tool if you have that toolbox, to find the best set of parameters for some standard type of dist...

4 years ago | 0

Answered
how to fill 3D array with alternate data from another 3D array
This is a partial example but you can use an index vector to designate all the rows you want to copy from data1: Icopy = [1:3...

4 years ago | 1

| accepted

Answered
How to create GUI for Transmitting and receiving image using MATLAB
You can use AppDesigner to create GUIs.

4 years ago | 0

Answered
How to convert .mat to .txt?
You can save variables from MATLAB to text using writematrix. Older versions of this are called csvwrite or dlmwrite.

4 years ago | 0

Answered
Integrator doesn't work properly
The output of your first integrator is always positive. So the second integrator will keep increasing until its input become ze...

4 years ago | 0

Answered
update values ​​in a for loop except one
Not understanding what you are trying to do exactly. But one way to test that a counter has reached some multiple of an integer...

4 years ago | 0

Load more