回答済み
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...

2年以上 前 | 1

回答済み
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.

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
'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.

2年以上 前 | 1

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 1

| 採用済み

回答済み
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);...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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 "...

2年以上 前 | 1

| 採用済み

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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 ...

2年以上 前 | 0

回答済み
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 ...

2年以上 前 | 0

| 採用済み

回答済み
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

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 0

回答済み
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". ...

2年以上 前 | 0

| 採用済み

回答済み
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...

2年以上 前 | 1

回答済み
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...

2年以上 前 | 0

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

2年以上 前 | 0

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

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 1

| 採用済み

回答済み
How to create GUI for Transmitting and receiving image using MATLAB
You can use AppDesigner to create GUIs.

2年以上 前 | 0

回答済み
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.

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
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...

2年以上 前 | 0

回答済み
Why isnt my Matrix being populated with values
Your code fails on this statement: [allState{N:-1:1}] = ndgrid(1:E); So it is unable to enter the loop to update omega. T...

2年以上 前 | 0

回答済み
How do i create a username and password login system that takes multiple accounts
Use strcmp to compare string contents rather than their lengths. Not that MATLAB is probably not very secure for taking passwor...

2年以上 前 | 0

回答済み
How to specify any regions in a 3D-Plot with different colors
Use index vectors: Igreen = denorm_pred < 0.5; Ired = denorm_pred > 1; Iyellow = denorm_pred >= 0.5 & denorm_pred <= 1; ...

2年以上 前 | 0

| 採用済み

さらに読み込む