Answered
Nonlinear fit to 100 data sets with seven unknown
The residual norm you want may be unrealistic. I would use the ga (genetic algorithm) function (perhaps in a loop to run it sev...

6 years ago | 0

Answered
How to define an empty table with variable type of a column as a matrix?
I doubt that has a solution, with the way you created ‘tab’ originally, since it exceeds the column size you set for it. You ...

6 years ago | 1

| accepted

Answered
How can I calculate FVF ?
I am not certain what you want. Try this: bf = 355.5+[-1 1]*355.5*0.07; bm = 34.4+[-1 1]*34.4*0.2; FVF = bf./(bf.*bm); ....

6 years ago | 0

Answered
QRS onset and offset
If you have a relatively recent version of MATLAB (R2017b or later), the approach in How to find QRS complex for this Graph? wil...

6 years ago | 0

| accepted

Answered
How to convert from a matrix to a cell?
Use the mat2cell function: A=[1 2 3 4 5 6 7 8; 9 10 11 12 13 14 15 16]; B = mat2cell(A, [1 1], [4 4]); B11 = B{1,1} ...

6 years ago | 0

| accepted

Answered
Find the equation f(x)
Any number of functions could likely fit those points. Try this for fun: x = [6198731 6473174 6685615]; y = [1969259859875...

6 years ago | 0

Answered
How can I put legend for some of my curves?
See the legend documentation section on: Included Subset of Graphics Objects in Legend You can define the colours, line styl...

6 years ago | 0

Answered
individual sum of array in cell
Use the cellfun function: array1 = {[4,3.3,2.5,0.71];[3.4,2,1,0.3]}; results = cellfun(@sum, array1) producing: results = ...

6 years ago | 0

| accepted

Answered
Obtaining the standard normal z score
Try this: z = norminv(1-0.05/2) producing: z = 1.9600 Without the Statistics and Machine Learning Toolbox: CV =...

6 years ago | 0

| accepted

Answered
How to solve Matrix that consists of a variable
See if the linsolve function will do what you want. syms Vs Iv = sym('I',[4 1]); Zm = sym('Z', [4 4]); Zm(1,[3 4]) = 0; ...

6 years ago | 1

| accepted

Answered
Amplitude modulation & demodulation signal
‘... the graph doesnt want to appear.’ It wants to appear, however you are not letting it! The (1:1) subscript reference a...

6 years ago | 0

| accepted

Answered
How can I insert a separate line of text with inputdlg?
Try this: dlgtitle = 'Please fill in the following variables: '; prompt = {'Age','Height','Weight'}; vc = inputdlg(prompt, d...

6 years ago | 0

Answered
Error using detrend. Too many output arguments
You are asking detrend to remove a linear trend. To get the slope and intercept of your data, use the polyfit function. Ther...

6 years ago | 1

| accepted

Answered
What is the meaning of a KW in a specification of a grid?
Think about it. Power (kW or kVA) is voltage multiplied by current. There is no current if there is no load.

6 years ago | 0

Answered
Problem in statistical test
The terminology can be confusing. From the Wikipedia article Null hypothesis (Basic definitions): "The statement being tested...

6 years ago | 0

| accepted

Answered
Non linear noise on ecg signal
See: Contaminate an EMG with 50 Hz signal for one example.

6 years ago | 1

Answered
plot a sine wave of a vector
Try this: y = load('Data.txt'); x = linspace(0, numel(y), numel(y)); figure plot(x, y) grid It does not look a lot like...

6 years ago | 0

Answered
please tell the solution
If ‘T’ is a scalar, note that ‘Cp’ is also a scalar, so by definition it is a (1x1) array. Referring to it with any dimension g...

6 years ago | 0

| accepted

Answered
How can I get the central frequency out of a fft?
Not possible to run your code. One option is to use islocalmax, specifically using 'FlatSelection','center'.

6 years ago | 0

Answered
How to prevent overlapping of graph lines?
Use a logarithmic y-axis: x = [20000, 40000, 60000, 80000, 100000]; y1 = [100232986, 397895944, 900510601, 1597421811, 249452...

6 years ago | 0

Answered
Estimate the unknown parameters of an equation with the help of matlab?
Parameter estimation is straightforward in MATLAB, even for relatively complicated problems. Write your objective function to...

6 years ago | 0

Answered
Derivatives for trig functions
Start with the Symbolic Math Toolbox: syms x positive real y(x) = asec(3*x^2+1); then use the appropriate function to calcul...

6 years ago | 0

| accepted

Answered
Problem with intersect function
The intersectt function does not allow tolerances, so floating-point approximation error is going to present problems. Try th...

6 years ago | 0

| accepted

Answered
MATLAB GA reject individual after fitness function evaluation
‘Now, I would like to be able to reject an individual in case some of its parameters (computed in Hysys) don’t respect my indica...

6 years ago | 0

Answered
Vector output prints one after another
If you have R2013b or later, put them in a table: OutTable = table(t.', omega.',theta.',alpha.',Etotal.', 'VariableNames',{f, ...

6 years ago | 0

| accepted

Answered
Array Indices Must Be Positive Values
The problem is: v_y0 = @(y_0)((6*x_0(n*t_t)-s)-y_0)*n*s-2*n*x_0(4-3*c)*(1-c)/(4*s-3*n*t_t)*s+4*((1-c)^2); ...

6 years ago | 0

Answered
Using vpasolve to store an array of solutions
Use solve instead of vpasolve, then use vpa on each of the results: s=solve([eqn1,eqn2,eqn3,eqn4],[theta4,theta5,la,lc]); sth...

6 years ago | 0

Answered
how can i found the best linear function representing the following points ???
Try this: x=[ 0 0.6 1.2 1.8 2.4 2.8 ] fx=[ 1.1 2.5 4.9 6.4 9.3 14.1 ] B = [x(:) ones(size(x(:)))] \ fx(:); % ...

6 years ago | 0

| accepted

Answered
Different number of elements error.
Initially, you assign ‘g’ to the gravitational acceleration constant: theta0 = pi/3; g = 9.81; L = 1; then here you assign ‘g...

6 years ago | 0

| accepted

Answered
How to resolve empty inputdlg box issue?
Try this: a = inputdlg('Type a number:') if isempty(a{:}) disp('a is empty') % Info...

6 years ago | 2

| accepted

Load more