Answered
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

11 years ago | 0

Answered
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) ...

11 years ago | 0

Answered
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 ...

11 years ago | 0

| accepted

Answered
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...

11 years ago | 0

Answered
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);

11 years ago | 0

Answered
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);

11 years ago | 3

Answered
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);...

11 years ago | 1

| accepted

Answered
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 ...

11 years ago | 0

Answered
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!

11 years ago | 0

Answered
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))

11 years ago | 1

| accepted

Answered
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];...

11 years ago | 0

| accepted

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

11 years ago | 0

Answered
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...

11 years ago | 1

Answered
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+...

11 years ago | 0

| accepted

Answered
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...

11 years ago | 1

| accepted

Answered
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...

11 years ago | 0

Answered
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 ...

11 years ago | 0

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

11 years ago | 0

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

11 years ago

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

11 years ago | 0

Answered
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...

11 years ago | 0

Answered
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(:); ...

11 years ago | 0

| accepted

Submitted


Stroop Test
Test two key cognitive skills, response inhibition and selective attention

11 years ago | 4 downloads |

4.5 / 5
Thumbnail

Submitted


Fractional differentiation and integration
The n-th order derivative or integral of a function is calculated through Fourier series expansion.

12 years ago | 1 download |

0.0 / 5
Thumbnail

Submitted


General Single Step Single Solve integration algorithm
Direct linear or nonlinear explicit or implicit time integration of structural dynamics problems

12 years ago | 1 download |

3.0 / 5
Thumbnail

Answered
How to copy a sub-matrix/vector along diagonal of a larger matrix with varying number of sub-matrices?
e = ones(n,1); A = full(spdiags([e 2*e 3*e], 0:2, n, n+2)) A = full(spdiags(A, 0:5, n, n+5)) A = full(spdiags(A, 0:8, n...

13 years ago | 0

Answered
Correlation: is this correct?
Dear Nuchto, See this: x=rand(4,30); y=10*x+5; corr=sum(zscore(x',1).*zscore(y',1))'/size(x,2) this is different from...

13 years ago | 0

Answered
problem during running my "while" loop?
How are X0 and Y1 defined? George

13 years ago | 0

Answered
How to vectorize this loop ?
window_length = 10; X(X==0)=Inf; X_2=repmat(X,1,length(X)-window_length); X_3=triu(X_2,-window_length)-tr...

13 years ago | 0

Answered
Matlab Error (Z must be a matrix, not a scalar or vector.)?
Is this what you want? x = -2.5:.1:2.5; y = -2.5:.1:2.5; [X,Y] = meshgrid(x,y); Z = 2*sin(X.*Y); mesh(X,Y,Z) g...

13 years ago | 4

| accepted

Load more