답변 있음
Using a cell array and a for loop
You can use you code with a little modification: First of all, you're showing first cell and then 5 cell from the beginning. Th...

대략 11년 전 | 0

| 수락됨

답변 있음
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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 0

답변 있음
Constucting an array in column form
A = (linspace(17,289,17))';

대략 11년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 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년 전 | 0

| 수락됨

더 보기