Answered
I need to fits the attached data as in image
This nonlinear least squares fit gives quite nice fit models: ... x = T2; y = L2; p = [1, 3]; % Guess: Fit model parame...

5 years ago | 0

Answered
zero frequency amplitude issue at fft
Here is correctly zero-padded signal and fft of whole signal: ... % this leads to.. t = (0:1/fs:662*1/fs)'; S0 = A0*zeros(si...

5 years ago | 0

Answered
Is it possible to set the default font size for shared axis labels in Tiled Layouts?
Use this instead: set(gca, 'FontSize', 16.0);

5 years ago | 0

Answered
How do I make the table function work?
Here is the correction: ... Norms=table(ndiv',L1norm',L2norm',LInfnorm', 'variablenames', {'ndiv', 'L1norm', 'L2norm', 'Linnor...

5 years ago | 0

Answered
zero frequency amplitude issue at fft
WHat you are doing is not zero padding. You are changing the block size and freq resolution. Thus, no matter what would be the ...

5 years ago | 0

Answered
Make a table with variable names which are saved as strings.
filename = {'abc', 'bcd', 'cde'}; A = magic(3); T = array2table(A, 'variablenames', filename);

5 years ago | 0

| accepted

Answered
I want to do correlation between 2 same images(1st with 0° and 2nd with some angular deflection) and thereby find angular displacement(θ/π)and displacements-Δx and Δy.
You can pick up the points of interest in both images and use cosine of angles between selected corresponding points points in b...

5 years ago | 0

Answered
How to convert encoded digital audio signal to analog form
You mean that you want to convert your binarized sampled data of analog signal into decimal format, right? If this is the case, ...

5 years ago | 0

Answered
I need to fits the attached data as in image
You can start using curve fitting toolbox, cftool that is quite straightforward and does not require any addional coding. An a...

5 years ago | 0

Answered
Trying to fill an empty array
There are a couple of crucial errs in your screenshoted code. (1) In "if" statement condition 2 after && sign "g(ii)" is missi...

5 years ago | 0

| accepted

Answered
i am not able to change x axis in the figure to time domain
Here is the corrected code: ... % Autocorrelation of x to delay by 2.5s [p, Lags]=xcorr(x,2.5*f); % To display the auto corr...

5 years ago | 0

Solved


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

5 years ago

Solved


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

5 years ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

5 years ago

Solved


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

5 years ago

Answered
How to get specific rows in a text file and store it in a matrix?
Here is a quick solution: %% Set up the Import Options and import the data opts = delimitedTextImportOptions("NumVariables", 7...

5 years ago | 1

| accepted

Answered
creating function that will accept input argument and return out argument
function OUT = SQUARE(a) OUT = a.^2; end

5 years ago | 0

Solved


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

5 years ago

Solved


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

5 years ago

Answered
How to break loop when successive values are too close
In this case, it can be solved using round(D, n) to set up the tolerance value. Where n is correct decimal digits.

5 years ago | 0

Answered
The order of reading files
In this case, a loop can be employed to read the files in the correct order, e.g." for ii= 1:N FileName(ii,:) = ['b' num2str(i...

5 years ago | 0

Answered
Help please: How do I solve those equations in MatLab?
Symbolic solution should be a first try, e.g.: syms ... and use: dsolve() If the symbolic math fails, to work with n...

5 years ago | 0

Answered
How can I recover my original image that I started with?
As understood your question, the easy solution is recall the imported image data. DATA1 =imread('MY_image.jpg'); % Original d...

5 years ago | 0

Answered
How do I solve two ode (dct/dt and dR/dt) simultaneously with ODE45 and optimize two parameters using global optimization ?
These are coupled ODEs. To solve these ODEs numerically: (0) Specify all constant parameters (1) Build fcn file or anonymous f...

5 years ago | 0

Answered
Read NaN data from excel file
If you are using xlsread(), then specify the cell range, e,g: DATA = xlsread('MY_data.xlsx', 'Sheet1', 'A1:D123'); Then you can...

5 years ago | 0

| accepted

Answered
which one of these is the right sol.? and let me know my mistakes please ..
Both are accurate and you can get the same results by changing this in the 1st one: fplot(Xb, [0, 5]); In the second one, you ...

5 years ago | 1

| accepted

Answered
How to find foci of an ellipse: x^2/36+y^2/9=1 ? and plot
Here is a nice discussion with codes that addresses your question. https://www.mathworks.com/matlabcentral/answers/399328-defin...

5 years ago | 0

Answered
putting a threshold into array values
Use this logical indexing operation: OUT = result_Hygepdf((result_Hygepdf(:,2)>0.1), 2);

5 years ago | 1

Answered
How do I break while loop
This has to be removed: if ask_promocode=='Y' end Because "while ... end" loop will take care of this issue that makes a...

5 years ago | 0

Answered
My code won't stop looping
Here is the correted part of the code. ... while err > tol Told = Tnp1; k=k+1; for i = 2:nx-1 for j =...

5 years ago | 0

| accepted

Load more