已回答
Help me about the error with symsum function to calculate the sum of series ?
Maybe because there is not any analytical formula which gives this sum. Can this function be integrated in an analytic way? I su...

10 years 前 | 0

已回答
Matlab problem: How to calculate a rough, approximate, derivative vector by using the following formula?
x=-10:10; y=x.^2; Yprimenum=diff(y)./diff(x)

10 years 前 | 0

| 已接受

已回答
Making each element of a row vector equal to zero
You can create a new vector with all zeros by typing the command: new=zeros(1,100) or by using a for loop: for I=1:...

10 years 前 | 0

已回答
detect consecutive duplicates in a structure
A(1).a=1 A(2).a=1 A(3).a=3 A(1).b=true A(2).b=true A(3).b=false for ii=2:3 ttest(ii-1)=A(ii).a==A...

10 years 前 | 0

已回答
Different length array comparison and replacements
% data A=[445; 874]; B= [265; 446; 744; 872; 875]; % engine AA=A(:,ones(1,size(...

10 years 前 | 0

已回答
Extra term in "min" function in while loop
The extra ,DC1(1,j) bit is the next command. You can erase the initial comma and press enter to get it in the next lin...

10 years 前 | 1

已回答
Finding x & y-values that maximize an expression!!!!
The expression for J does not have any maxima. This can be seen easily by geometric interpretation of the formula. J can be mini...

10 years 前 | 0

已回答
fft normalization and parseval
In the following code: var1=128; h=complex(randi([-1 1],var1,1),randi([-1 1],var1,1)); h=h/std(h); % no h is normaliz...

10 years 前 | 0

已回答
HOW TO ACCESS THE FOLLOWING ELEMENTS FROM THE GIVEN ARRAY
a=[ 0 0 0.3013 1.1305; 1.0000 2.0000 0.7390 0.4223; 3.0000 2.0000 1.1305 ...

10 years 前 | 0

已回答
Regarding Genetic Algorithm Optimization- How to stop GA tool after each generation
t=0.2; % or any other reasonable time value while exist('filename.extension','file')==2 pause(t) end

10 years 前 | 0

已回答
problem with if test to test the increment in time
T = 1e-4; h = T/100; n = 1000;%par exemple Ts = 0:T:n*T; j = 1; for t =0:h:n*T if ismembc(t,Ts) ...

10 years 前 | 0

已回答
interpolate data points problem
At least one entry in Y is NaN (Not-A-Number). To find it, type in the command window: find(isnan(Y)) You should check ...

10 years 前 | 0

| 已接受

已回答
How to reduce execution time? "If" and "ismember" functions
To make ismember function faster, replace it with either *ismembc* or *ismembc2* functions. *ismembc* returns an array of logica...

10 years 前 | 0

已回答
How to find the indices of element occuring once in a vector?
A=[1 1 -1 0 0 0 1 0 1 1]; [~,c]=histc(A,unique(A)); out=find(c==1);

10 years 前 | 0

已回答
How to find the indices of element occuring once in a vector?
A=[1 1 0 -1 0 0 1 0 1 1]; [~,c]=histc(A,unique(A)); out=A(c==1);

10 years 前 | 3

已回答
code of euler's method
A simple application of Euler method: Define the function: function E=euler(f,a,b,ya,M) h=(b-a)/M; Y=zeros(1,M+1);...

10 years 前 | 1

| 已接受

已回答
To sum functions which have two unknowns and finding the min values of these unknowns
See if this works: F=zeros(200,1); xy=zeros(200,2); BS=rand(4,2); r=rand(200); for ti=1:200 for m=1:4 ...

10 years 前 | 0

已回答
How to generate a total random 6 by 6 Latin Square?
Look at the following: http://www.mathworks.com/matlabcentral/fileexchange/12315-latsq/content/latsq.m Hope this helps!

10 years 前 | 0

已回答
How to make an anonymous function whose variable is itself a function of another variable?
z = @(phi) cos(phi).^2 + 4*sin(phi).^2 phi = @(x) x.^3 + 4*x.^2 + x +3 z(phi(3))

10 years 前 | 1

| 已接受

已回答
how to make output a for loop subtract sequentially a data set below it to give sum of differences
Do you want this: b=2; c=1; d=1; n=4; Y=b*c*d*n; X = [10 13 15 12 17 23 26 19]; f = [1 4 8 10 12 16 18 20];...

10 years 前 | 0

| 已接受

已回答
Breaking a function into components?
Make a function named myfunc as follows: %---------------------- function out=myfunc(a,vec) out=a.*vec; end %----...

10 years 前 | 0

已回答
How to generate an array alternating the values of two others?
A = [1 2 3 4 5 6]; B = [10 20 30 40 50 60 70 80 90 100 110 120 130 140 150]; M1=[A,A,A(1:3)]; M2=B; M=[M1;M2]; Se...

10 years 前 | 1

已回答
fminunc stopped because it exceeded the function evaluation limit, options.MaxFunEvals = 100 (the default value).
Define the objective function by setting its output with the opposite sign as follows: function F=fun(x) F=-0.2662*x.^6+...

10 years 前 | 0

| 已接受

已回答
hi am working on a code for gaussian elimination
The correct function is: function [x,U]=gausselim(A,b) % function to perform gauss eliminination %FORWARD ELI...

10 years 前 | 1

| 已接受

已回答
How can I solve system of the matrix differential equation within MATLAB?
eqn = 'D2y - A*Dy - B*y = C'; inits2 = 'y(0)=a, Dy(0)=b'; y=dsolve(eqn,inits2,'x') where a and b are the initial or bou...

10 years 前 | 0

已回答
trying to delete 2 cells of Nans, NOT To delete the row
At least one of the values of JT_S_TN([13,14,15,34,35,36,55,56,57,76,77,78],2) must be equal to 2 and at least one of the ...

10 years 前 | 0

已回答
matlab sovle newton raphson method
Look for the following Newton-Raphson solver in the File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/44315-...

10 years 前 | 0

已回答
simpsons rule in matlab
a= Initial point of integration interval b= Last point of integration interval n= number of sub-intervals (panels) of in...

10 years 前 | 0

已回答
a problem with for loop and indexinf
A={Array_1;Array_2;Array_3;Array_4;Array_5;Array_6;Array_7;Array_8;Array_9;Array_10}; for k=1:10 AR{k}=exp(A{k})+A{k...

10 years 前 | 0

已回答
delete a NAN but leave a zero instead to be later taken out
A=[NaN 0; 1 3; 1 3; 1 3; 2 4; 2 4; 2 4; 3 1; 3 1; 3 1; 4 2; 4 2; 4 2; NaN 0; 5 4]; sizA=size(A,1); A=A(:); ...

10 years 前 | 0

| 已接受

加载更多