Answered
Vectorize multiple nested for loops
I cannot understand what you are doing. If you have the Statistics and Machine Learning Toolbox, see if the <https://www.mathwo...

9 years ago | 0

| accepted

Answered
Problem with min function when finding minimum value
You probably have a variable that you mistakenly named *|‘min’|*. (This is called ‘overshadowing’ a MATLAB function with a vari...

9 years ago | 0

| accepted

Answered
Concatenate matrix with for loop
Try this: c = [a(:) b(:)];

9 years ago | 0

| accepted

Answered
Multiple Answers in Matrix
You would have to set up a separate index variable to do that in a *|for|* loop: k = 0:0.5:50; for kk = 1:numel(k) ...

9 years ago | 1

| accepted

Answered
How to use the lsim function
Use the <https://www.mathworks.com/help/control/ref/step.html *|step|*> (link) function with your system object.

9 years ago | 0

Answered
How to subset rows with reproducibility?
If you’re using a random number generator to select the rows, see the documentation for the <https://www.mathworks.com/help/matl...

9 years ago | 0

| accepted

Answered
Digitization of noisy signal
If your have version *|R2016a|* or later of the Signal Processing Toolbox, use the <https://www.mathworks.com/help/signal/ref/fi...

9 years ago | 0

| accepted

Answered
How to find inflection point, PLEASE HELP!
Inflection points are defined where the curve changes direction, and the derivative is equal to zero. See if this does what you...

9 years ago | 2

| accepted

Answered
What does this declaration do?
That appears to be an anonymous function to be used in one of the ODE solvers, such as *|ode45|*. The ODE solvers require that ...

9 years ago | 1

Answered
Getting "Undefined operator '*' for input arguments of type cell' error for my code
It is easiest to convert *|‘A’|* to a double array, then do the multiplication: X1 = cell2mat(A)*A1; Convert *|‘X1’|* t...

9 years ago | 1

Answered
How to average different transfer functions in order to obtain a global one?
Combining the transfer functions in any way is likely not a valid approach. (You have not posted your code, so I do not know ho...

9 years ago | 0

Answered
comparing cells in excel then calculate for the sum
I have no idea what you are starting with, since you did not post your chart in a form that we can read and use in a program. ...

9 years ago | 0

Answered
checking that a user input is an integer
There are several ways of testing to see if the returned value is an integer. You want to see if there is any non-zero valu...

9 years ago | 1

| accepted

Answered
Eliminating noise using butterworth bandpass filter
Assuming *|‘signal’|* is a _vector_ (as it appears to be in the image), you can accurately calculate the <https://www.mathworks....

9 years ago | 1

| accepted

Answered
Heaviside function in Matlab.
I am not certain what result you want. Try this: A = randi([2 3], 1, 30); % Create ‘A’ B = randi([2 3],...

9 years ago | 0

| accepted

Answered
Index exceeds matrix dimensions for fprinf
If your data are *_column_* vectors rather than *_row_* vectors, you will get that error: x = rand(5,1); ...

9 years ago | 1

Answered
How do I store values from nested loops?
Since *|‘result’|* appears to be a scalar, I would do this: x = -.99:.01:0.99; result1 = zeros(size(x)); for k = 1:n...

9 years ago | 0

Answered
How do you use ODE to solve four linear differential equations?
I would take advantage of the Symbolic Math Toolbox to create an anonymous function you can then use directly with any of the nu...

9 years ago | 2

| accepted

Answered
how to assign variables to user inputs
*_‘I think the final line of code may help in doing this but I don't understand what it does?’_* The *|inputdlg|* function ...

9 years ago | 1

Answered
How do I fit an exponential equation to raw data
You can use the *|fminsearch|* function to do the nonlinear regression. *_The Code_ —* P = load('pressure.mat.txt');...

9 years ago | 1

Answered
Nonlinear regression for adsorption with Langmuir isotherm
I have not done anything with the <https://en.wikipedia.org/wiki/Langmuir_adsorption_model *Langmuir adsorption model*> (link) i...

9 years ago | 0

Answered
Hi!! I am trying to filter this noisy ECG signal which I have. I tried many of the filtering methods like savitzky golay, FIR(using filter design app). tried with many other types too. But nothing seem to work
Your EKG has some sort of broadband noise that a frequency-selective filter cannot completely eliminate, and a wavelet decomposi...

9 years ago | 0

Answered
How do I use for loops and if statements to find numbers in a two dimensional array and replace them?
In your _homework assignment_ that requires *|for|* loops and an *|if|* block, you need _two_ nested loops, one looping through ...

9 years ago | 0

| accepted

Answered
different dimension matrix addition
I am not certain what your constraints are. One (rather obvious) way to get *|‘C’|* is: A = [1 2 3 4 5]; B = [0 0 ...

9 years ago | 0

| accepted

Answered
I can't seem to find the error in my program.
You are passing a _function handle_ as an argument to *|conv|*. That is throwing the error. Pass the function with an argu...

9 years ago | 1

| accepted

Answered
wanted help in matlab code
*_‘Is this way of writing correct.’_* Yes. You can simplify it even more as: d = k; The second assignment needs t...

9 years ago | 1

| accepted

Answered
Designing a metlab input
I would begin by using the <https://www.mathworks.com/help/matlab/ref/inputdlg.html *|inputdlg|*> (link) function.

9 years ago | 0

Answered
I don't have camera calibrator app.
The <https://www.mathworks.com/help/vision/ug/single-camera-calibrator-app.html *Single Camera Calibration App*> (link) is part...

9 years ago | 0

Answered
Output of matrices with symbolic values not being zero but instead being x*e^-17
Use the <https://www.mathworks.com/help/symbolic/vpa.html *|vpa|*> (link) function: R10=vpa(R) R10 = [ cos(th), ...

9 years ago | 0

Answered
Why is my function giving me a string when I should get a structure?
You told it to! You might want to create another field: car.Message = 'Invalid car parameters'; Remember to assign...

9 years ago | 0

Load more