Answered
Assigning value to a variable.
Put simply: x(1)=1; % ‘x’ is an array, with the first element assigned to ‘1’ y(1)=1; ...

6 years ago | 0

| accepted

Answered
How to correspond line colors with histogram
The FaceColor property of the bars is 'auto', so if you want the colors to be the same, it is necessary to define them: out = ...

6 years ago | 0

| accepted

Answered
Filtered signal plot not showing up
It’s necessary for you to understand the problem with your indexing. This: n = 200; k = 500:(n-1) produces: k = 1×0 ...

6 years ago | 0

| accepted

Answered
Local Maximums of a plot
The islocalmax function could be helpful here. The Signal Processing Toolbox has findpeaks.

6 years ago | 1

Answered
Plotting graph with only one point (x,y) and slope
A bit of algebra (courtesy of the Symbolic Math Toolbox to prevent stupid errors, that I will let you re-derive if you wish) mak...

6 years ago | 0

Answered
How to graph this 'for' loop
Try something like this (with the correct variable values): T_inf = eps; % Not ...

6 years ago | 1

Answered
Vectorization and a strange result
Your ‘mytest.mat’ file contains: fx_1: [1×150 double] beta: [1×25 double] t: [1×150 double] con...

6 years ago | 1

Answered
changing y axes on a loglog graph
Add these linmes at the end of your posted code: ylim([1 1E+3]) ytk = yticks; yticklabels(ytk) so the full code is now: x...

6 years ago | 0

Answered
beta0 value estimation in fitnlm
The usual approach is to make a wild guess as to the magnitudes of the parameters, and hope for the best. A more sophisticate...

6 years ago | 1

| accepted

Answered
Adding header - Function with two outputs and two frequencies.
Even after reading your other post, I am still not certain what a ‘header function’ is. Perhaps an anonymous function will do...

6 years ago | 0

Answered
Numerican Integration in Matlab
See my Answer to your duplicate Question: Numerical Integration In Matlab

6 years ago | 1

| accepted

Answered
Numerical Integration In Matlab
The integral function will produce one value for the specific limits of integration. To create a vector from its outputs, a loo...

6 years ago | 1

| accepted

Answered
Plot command, horizontal line as a marker
The '_' (and '|') markers were introduced in R2020b. So to use it, you will need to upgrade to the latest release. (The online...

6 years ago | 1

Answered
splitting up numbers in a cell of a double
See if the num2cell function will do what you want. EDIT — (13 Oct 2020 at 12:53) (Question was essentially completely cha...

6 years ago | 0

Answered
need to write values on contour plots
See: Contours with Labels

6 years ago | 0

Answered
Graph colour using patch
I am not certain what you want. Try this for the plot: v2gt0 = v(2,:) > 0; nnzv2gt0 = nnz(v2gt0); figure plot([1;1]*(1...

6 years ago | 0

| accepted

Answered
Finding intersect between 2 lines.
Add this: thick_half_cpm = interp1(cpm, thickness, half_cpm); to get the intersection, so the full code becomes: % Experime...

6 years ago | 1

| accepted

Answered
solving non linear equation
First: vv = vectorize('0.17*((S/10.8)+(S/21.6*sqrt(1+16*((S/5.4)^2))+((1/16)*log((4*S/5.4)+sqrt(1+(16*(S/5.4)^2))))))- t') the...

6 years ago | 0

| accepted

Answered
Problem in finding peak, how to find the first peak?
I do not see any peaks. It is just sort of L-shaped lines. That aside, if you do have data with peaks and you only want the ...

6 years ago | 0

Answered
calculate successive linear regression from data separated by NaNs
If ‘ExsA’ is your matrix: v = ~isnan(ExsA(:,2)); idxstrt = find(diff([0; v; 0])==1); idxend = find(diff([0; v; 0])==-1)-1; ...

6 years ago | 1

| accepted

Answered
For what is this: postStr += "\r\n\r\n"
It appears to be an instruction to terminate a read or write format string of some sort with a string of 2 carriage returns (the...

6 years ago | 0

| accepted

Answered
How to automatically modify matrix?
Extracting a few rows to illustrate: Matrix = [7380 0.595558700658025 0.686 7440 ...

6 years ago | 0

| accepted

Answered
How to display all IMFs on the plot?
The emd documentation example Visualize Residual and Intrinsic Mode Functions of Signal works when I try it. Highlighting all...

6 years ago | 1

Answered
Accessing 1 by n array from a cell array
The problem is that the square brackets [] concatenate the two cells to produce: a = 1×5 cell array {'poh'} {[3...

6 years ago | 0

| accepted

Answered
problems playing .wav file in matlab online
This is a known issue, and was reported in MathWorks Bug Report Notification on 6 Oct 2020. See sound and soundsc fail to play ...

6 years ago | 2

| accepted

Answered
Matlab GA toolbox coupling with external simulation code.
See if the approach in Parameter Estimation for a System of Differential Equations will do what you want. It uses the ga functi...

6 years ago | 0

Answered
Normalizing histfit plots to all have the same height of 1
In a Comment in Getting FWHM from distribution fitter you requested my attention to this. Try this: a = randn(1,1E+4); ...

6 years ago | 0

| accepted

Answered
Error using / Matrix dimensions must agree for Vr
Vectorise! Vr = 1-((R^2)./(r.^2)).*Vo.*cos(theta); ↑ ↑ ↑ ← HERE That should do what you want. Se...

6 years ago | 1

| accepted

Answered
dBc/Hz phase noise undefined function error?
In a Comment in how to find fwhm using fwhm()? , you requested that I look at this, so I will do what I can. I do not have t...

6 years ago | 0

| accepted

Answered
Non- Linear curve fitting
It is necessary to vectorise every multiplication, division,. and exponentiation in an objective function. With those changes...

6 years ago | 0

| accepted

Load more