已回答
i am trying to fit weibull curve between X and Y where X is independent and Y is dependent variables.i am using nlinfit but how to figure out starting values of parameter .i am using 0 value of location parameter.
IF you don't know the values close to the solution, you can always start with random number and then see how it turns out. For t...

11 years 前 | 0

已回答
How to use fprintf function.
I am not gonna give you the solution (I will and many others like walter will correct your code, once you made an attempt). If I...

11 years 前 | 0

已回答
Replace matrix with the other random matrix.
How about simply: rng(0); arnold_new_null = rand(size(arnold_new)); rng(1); arnold_new_ones = rand(size(arnold_new...

11 years 前 | 0

| 已接受

已回答
Central difference approximation scripts to calculate first derivatives of smoothed signal got from smooth function, Method: 'Savitzky-Golay'
For central difference: http://www.mathworks.com/help/matlab/ref/gradient.html For SG: http://www.mathworks.com/matlabcentra...

11 years 前 | 0

| 已接受

已回答
Accessing nested array data
out_new = zeros(1,61); for j = 1:61 [x,y] = find(counties(j).surge15feet); if (~isempty(x)) out_new(j) = max(...

11 years 前 | 0

| 已接受

已回答
How can I write a function called triAreaN that computes the area of N triangles?
function A = triAreaN(Ar) % Ar is 2XN array where each column is base and height A = 0.5*Ar(1,:).*Ar(2,:); A(Ar(1,:) ...

11 years 前 | 1

已回答
How can I define multiple named inputs for a function
This is a nice info regarding what you're asking: http://www.mathworks.com/help/matlab/matlab_prog/support-variable-number-of-in...

11 years 前 | 0

已回答
Help with Matrix Summations
eigen_nl_expected = [eigen_nl(:,:,1);eigen_nl(:,:,3)] eigen_nl_expected(4:9) = eigen_nl_expected(4:9) + eigen_nl(:,:,2);

11 years 前 | 0

已回答
How can I add random noise using the rand function with the noise being uniformly distributed between 0 and 2?
z=a1*x.^2 - a2*y.^2 + a3*x.*y + 2*rand(size(x));

11 years 前 | 0

已回答
Problem with Running a matlab code.
After looking at the plots, the issue turns out to be memory issue. The first time, you used it, MATLAB could create the matrix....

11 years 前 | 0

已回答
I want help to solve constrained quadratic equation using fmincon function of matlab optimization tool box
Here are 2 links: The first one is about fmincon and second one is how to write constrains http://www.mathworks.com/help/opti...

11 years 前 | 0

已回答
Append rows at the end of Matrix
A = [1 2 3;4 5 6;7 8 9]; A = [A; ones(7,3)*5];

11 years 前 | 10

已回答
How to express a function both time and spatial dimension dependent?
Well, your time is stored in vector t. So lets say you want to plot ub1 versus time, it will be: plot(t,ub1);

11 years 前 | 0

已回答
??? Index exceeds matrix dimensions.
The error is in line pos = pairsVec(booleanDistance==1,1:2); You entered displayDetectedBlocks('2.jpg',1,1,2) and the pa...

11 years 前 | 0

已回答
Basics of fminsearch to be explained in laymens terms
In layman's term, fminsearch tries to find the minima of the function starting with the point given. Like in your case, fminsear...

11 years 前 | 0

| 已接受

已回答
How insert marker points on plot
After your plot of all the points: hold on; I = [1, 1430,2859,4288,5717,7146,8575,10001]; plot(t(I),y(I),'*b');

11 years 前 | 1

已回答
To find the minimum of a function which are constrained problems
Step 1: Make you function function Y = myFunc(P,P0) N = 2; Pa = 9; k = floor((P0*N/Pa)); Y = F(P)+k*F(N*P0-P*k)...

11 years 前 | 0

已回答
Subset time series plot
t = 0:0.001:10; x = 0.2*cos(t) + cos(1.4*t) + 0.8*cos(5.2*t) + 0.02*randn(1, 10001); N = 7; % Number of divisions I =...

11 years 前 | 1

| 已接受

已回答
Initialization code not loading from GUI
Becuase project.fig file is just the figure file. There must be a project.m file. That is the executable file. You run that, it ...

11 years 前 | 0

| 已接受

已回答
How do I find the non-zero column in a matrix and create it as a single matrix?
tmp = A'; B = tmp(tmp > 0);

11 years 前 | 1

已回答
Problem with ODE solvers
What theoretical analysis you did which says that this does not diverges? To me, this will diverge as the size of x goes bigg...

11 years 前 | 0

已回答
Multiple linear regression with constraint
If you have 7 coefficients and there is a constrain that sum of coefficients are 1. Then, isn't technically you need to find onl...

11 years 前 | 0

已回答
Problem with dlmwrite writeing a tensor in a csv file
Try this: % fid2 = fopen('dati_orig.csv','w'); for k=1:p % ele=xmat_orig(:,:,k); dlmwrite('dati_orig.c...

11 years 前 | 0

已回答
Constucting an array in column form
A = (linspace(17,289,17))';

11 years 前 | 0

| 已接受

已回答
Help with compiling Matrix & Loop Function Please
nodes = permute(sub_ele_nodes,[1 3 2]); nodes = reshape(nodes,[],size(sub_ele_nodes,2),1); nodes = unique(nodes,'rows','...

11 years 前 | 0

已回答
How to use a function output in another function?
A = matrixy; A function has an output and the name. Unless you define the output, it goes to _ans_ variable.

11 years 前 | 0

| 已接受

已回答
How to code this?
histc supports matrixes. So you dont hove to use for loop. http://www.mathworks.com/help/matlab/ref/histc.html

11 years 前 | 0

已回答
positive index error in matlab
In MATLAB f(x) usage is to (if f is a matrix) access the xth element in the matrix. And Here thats why you're getting this error...

11 years 前 | 0

| 已接受

已回答
Extract numbers from Matrix and create a matrix
For problem A, you are looking for odd rows and column, so the indexes should go for 1 with an increment of 2. Like A =...

11 years 前 | 0

| 已接受

已回答
gaussian fitting piece wise for multi peak curve
Try these: http://www.mathworks.com/matlabcentral/fileexchange/23611-peak-fitter And few demo files: http://www.mathworks....

11 years 前 | 0

加载更多