I use MATLAB for small jobs and C++ for real jobs.

Professional Interests: Problem solving

Top 1% contributor

**378**Contributions

Try this: [i,j] = ndgrid(1:n*n); r = reshape(a(i)+a(j), [n n n n]);

accepted

4

Answered 3 years ago

child = A; child(A ~= B) = 0;

4

Answered 3 years ago

input('\nsome question :', 's')

accepted

1

Answered 3 years ago

Do this: tic doStuffThatYouWantToTime(); toc

accepted

1

Answered 3 years ago

nneg = sum(a==-1); npos = sum(a==1);

accepted

1

Answered 3 years ago