Answered
what is mean by this
It sets the *|‘xd’|* field of the *|i-th|* element of structure *|‘S’|* to *|rand|* times a variable called *|‘xm’|*. The *|‘(1...

9 years ago | 1

Answered
How to determine maximum of n times FOR loop iteration
The only way to know in advance the number of iterations a loop can take is to specify them as a separate variable and see the n...

9 years ago | 1

| accepted

Answered
How to rename TABLE column by the combination of Character and number?
I am not certain what result you want. All table variable names have to be valid MATLAB variable names, so decimal points are n...

9 years ago | 1

| accepted

Answered
How to Add Values from One Matrix in between the values of another?
This works: a = [ 1 3 5 7 9 11]; b = [ 2 4 6 8 10]; c = zeros(1, numel(a)+numel(b)); c(1:2:end) = a; c(2:2:end...

9 years ago | 0

| accepted

Answered
lsqnonlin with tanh solutions
The hyperbolic tangent may not be appropriate for a PPG signal. However, if you want to use it, a more reasonable function ...

9 years ago | 0

Answered
Is it possible to plot an additionally rectangle into a Bode plot ?
The plot produced by the *|bode|* function will not allow any alterations. The solution is to use the *|bode|* function wit...

9 years ago | 1

| accepted

Answered
How can I perform a paired sample t test with unequal sample sizes ?
I would use the Wilcoxon rank sum test for your data. This assumes that they are *(1)* independent, and *|(2)|* identically dis...

9 years ago | 1

Answered
Find min in matrix given specific rows and columns?
One approach: idx = sub2ind(size(A), r', c'); % Define ‘Eligible’ Elements As Linear I...

9 years ago | 1

| accepted

Answered
How to define one cycle from my data by taking the max value??
Try this: onecycle = f((maxI-25):(maxI+25)); Indices in MATLAB must be integers greater than zero. I am assuming her t...

9 years ago | 0

| accepted

Answered
How do you save a new audio file from a sound on matlab?
The file name has to be a string: audiowrite('anna_ten10.wav', trimmed_anna_ten10, 44100) I am assuming here you want t...

9 years ago | 1

| accepted

Answered
How to access column or a row in Table
I am certain you have already read the documentation on <https://www.mathworks.com/help/matlab/matlab_prog/access-data-in-a-tabl...

9 years ago | 0

| accepted

Answered
How to use the equation y=mx+b
x = 0 : 5; m = 2; b = 1; y = m*x + b; figure(1) plot(x, y) grid axis([0 5 0 12])

9 years ago | 6

Answered
FFT of a damping signal
Try this: D = load('FFT.txt'); t = D(:,1); s = D(:,2); Ts = mean(diff(t)); ...

9 years ago | 1

| accepted

Answered
How can I mirror the Y axis from -x to x
With only a description, I can only guess. However, assuming that your data are _row_ vectors, something like this will work: ...

9 years ago | 1

| accepted

Answered
Problem with fsolve and nonlinear equations
You are not calling *|fsolve|* correctly with your function. Try this: vars_out = fsolve(@(vars) fffRoinvof(vars,beta...

9 years ago | 0

Answered
How to store all answers from nested for loop?
The easiest way is to subscript them and create a 3D array: a = [1 2 3]; b = [4 5 6]; CTnum = [100 200 300] for k = ...

9 years ago | 0

Answered
Loop over a vector and store value in new vector error
In MATLAB, subscripts must be integers greater than zero. This would work: w1 = 42; % ...

9 years ago | 1

| accepted

Answered
How do I get directional profile of 2D functions ?
One approach: v = -1:0.1:1; xline = x0*v; yline = y0*v; zline = sqrt(xline.^2 + yline.^2); zline(zline > 0.9)=...

9 years ago | 0

| accepted

Answered
Index Vector in MATLAB
I do not understand what you want to do. One of these should work: a = [1 2 3]; b = [4 5 6]; for k = 1:min([numel(...

9 years ago | 0

| accepted

Answered
FFT of Vibration Data With 1 Sample Per Second
I had to plot your data in the time domain to understand that only foiur channels seem to have information, and that in the rang...

9 years ago | 0

Answered
How to get the matrix of corresponding values of a PSD graph?
The *|psd|* function is going to be deprecated in the not distant future. I would use the <https://www.mathworks.com/help/s...

9 years ago | 0

Answered
Reading data in cell arrays help
*_‘... what i am confused about is the (i:end-3+i,j:end-3+j) part.’_* Here, *|end|* is the size of the array in that dimens...

9 years ago | 0

| accepted

Answered
Filling cell array in specific date domains
*_‘GivenData(2,3) should be written in Database(5:10,173) GivenData(2,4) should be written in Database(5:10,174) end so on’_* ...

9 years ago | 1

| accepted

Answered
Is it faster to operate a sparse matrix than a dense one when they have the same size?
The best way to find out is to experiment! This is especially true if you have a specific example, such as you illustrated in y...

9 years ago | 0

Answered
plotyy legend for multiple lines ( R2012a)
I no longer have access to *|R2012a|*, so I tested this in *|R2017a|*. See if something like this works: x = linspace...

9 years ago | 0

| accepted

Answered
Is there a way to attach .c files to Answers and Comments
I would name it as *|‘filename.c.txt’|*. That may work. After downloading it, strip the *|.txt|* extension with *|movefile...

9 years ago | 0

| accepted

Answered
why time scope maximum value only 1V from audio device reader
*_‘I just need to know the maximum value of the device that I made.’_* Because of the inherent limitations of sound cards a...

9 years ago | 0

| accepted

Answered
Plotting of graph with multiple curve
I am not certain what you want to do. You already appear to have defined three different values for *|‘beta’|* (as defined in y...

9 years ago | 0

| accepted

Answered
how to split values in a cell
If you have *|R2015b|* or later, use *|splitapply|*: D = load('matlab.mat'); out = D.out; [G, ID] = findgroups([out{...

9 years ago | 0

Answered
How can I rewrite this code as to ommit the for loop?
See if this does what you want: labda2 = randn(5, 5, 2) % Create Data labda3 = randn(5, 5, 2) ...

9 years ago | 1

| accepted

Load more