Answered
Delete rows of an A matrix using another B matrix
Without your matrices, an actual illustration is not possible. I would use the ismembertol (link) function, with the 'ByRows'...

8 years ago | 1

| accepted

Answered
Error using textscan Unknown option '%f'
I have no idea what you want to do. Perhaps this: C = textscan(fileid, '%s %f ', 'delimiter',';'); I added a space for ea...

8 years ago | 0

Answered
Delete the row of text file with specific character
One approach (assuming your file is a cell array): C = {'MCVB' 101.12 1.0 'Sg' 'HBVB' 64.48 1.0 'Pg' 'HBVB' 110.0...

8 years ago | 0

Answered
fmincon: how should x0 be specified
The way you specified ‘x0’, it is a ‘0×30 empty double matrix’! I would specify it as the median of the bounds, so here: lb...

8 years ago | 0

| accepted

Answered
ttest2 negative value
Please see my Answer to your previous question that is a duplicate of this one.

8 years ago | 0

| accepted

Answered
ttest2 negative value
It would help to know what MATLAB version (release) you are using. I am not aware that option ever existed. If you want to s...

8 years ago | 0

| accepted

Answered
Error using horzcat Dimensions of arrays being concatenated are not consistent?
Your ‘melanie_ode_fj’ function has only one output (as it should): function dx=melanie_ode_fj(t,x) If you want other output...

8 years ago | 0

| accepted

Answered
How do I get the error of a fitting function?
If I understand correctly what you want to do, the Statistics and Machine Learning Toolbox function nlpredci (link) is likely wh...

8 years ago | 0

| accepted

Answered
How can I dispay the value 5.0119e-04 as 0.50119 milli ? in command window
Perhaps this: sprintf('%.5f milli', 5.0119e-04*1E3) produces: ans = '0.50119 milli'

8 years ago | 0

Answered
How can I solve the error: error using csvread Too many output arguments?
The csvread function has only one output. Perhaps you were thinking of the xlsread (link) function?

8 years ago | 0

Answered
what could be causing matrix dimensions must agree error
You need to use element-wise operations (the ‘dot operator’) in the exponentiation and division, in your lambda and gain calcula...

8 years ago | 1

| accepted

Answered
How can I combine two curves ,?
This is how I would do it: loglog(R_load,v0,'b',R_load,v05,'m',R_load,v1,'g') hold on ...

8 years ago | 0

| accepted

Answered
Find the location of the change
If you have the Signal Processing Toolbox, consider using the findchangepts (link) function, with the 'Statistic','mean' name-va...

8 years ago | 1

| accepted

Answered
How to fit a line through this data "smartly" ?
One approach (using the Signal Processing Toolbox medfilt1 function): D = load('data.mat'); X = D.X; Y = D.Y; Ts = mean(d...

8 years ago | 0

| accepted

Answered
Filter specific frequencies in an audio file
If you have R2018a or later, use the bandpass (link) function. If you want to filter it in the frequency domain, see the docu...

8 years ago | 0

| accepted

Answered
random number estimate value
Try this: b = 0.1; fun = @(x,y,a,b) a*x.^2 + b*y.^2; q_fcn = @(a) integral2(@(x,y)fun(x,y,a,b),0,5,-5,0) % real value 125 a...

8 years ago | 0

| accepted

Answered
How can I find the header of a matric?
See the documentation section on: Importing Flexible Image Transport System (FITS) Files (link) and the fitsinfo (link) function...

8 years ago | 0

Answered
How to interpolate between two sets of data
I am not exactly certain what result you want. Try this: % experimental predicted D = [ 966 1033 ...

8 years ago | 0

Answered
Remove the need for nested for loop
I am not certain of the result you want. Try this: a = randi(9, 1, 5); % Create Vector ...

8 years ago | 0

| accepted

Answered
Find date time value that corresponds to maximum daily value
It will likely be best to create a timetable if your data, then use the retime function to calculate the maximum daily value. Y...

8 years ago | 0

Answered
Best Fit line, choosing which points to include and not include
Use all the points in your data set when you first do your regression. If you then want to remove significant outliers, use t...

8 years ago | 0

Answered
filtering DC from digital audio signal
To filter D-C from any signal, simply subtract the mean value of the signal from the signal. The mean and minus (binary subtrac...

8 years ago | 0

Answered
what the error in this function means?
The second output of polyfit is a structure of values that can be used to calculate error estimates. If you want the error esti...

8 years ago | 0

Answered
How to determine the phase difference/phase shift between two signals?
Here is something to experiment with (based on the Arbitrary Phase Shift (link) section of the Wikipedia article List of trigono...

8 years ago | 2

Answered
Inverse of atan2d
Try this: y = 2; x = 3; answer = atan2d(y,x) xa = cosd(answer) ya = sind(answer) test = atan2d(ya,xa)

8 years ago | 0

| accepted

Answered
Creating a Matrix using a nested "for" loop.
I would use the ndgrid (link) function instead: [X,Y] = ndgrid(3:3:9) producing: X = 3 3 3 6 6 6...

8 years ago | 0

Answered
How can I link elements in corresponding rows of two matrices of the same dimension?
See if the findgroups (link) and splitapply (link) functions will do what you want. (They were introduced in R2015b.)

8 years ago | 0

| accepted

Answered
Why is the lhs function, including the example posted in the MathWorks documentation, not working?
Apparentlly, MATLAB can’t find the Symbolic Math Toolbox. First, run these from your Command Window or a script: restorede...

8 years ago | 1

| accepted

Answered
How to fix the coefficients values using the fitnlm() function
There are likely several approaches you could trake to this. This one seems to work: b0 = [0.06; 50; 0.5]; modelfun = @(b,...

8 years ago | 0

| accepted

Answered
How many matrices agree with the mean?
The best estimate of the dispersion of the mean is to use the standard error of the mean: where is the standard deviation a...

8 years ago | 0

Load more