Community Profile

Contact

Top 10% contributor

Um ... since the negative numbers match up, I modify my c++ code to generate the vector in this way for (int k=0; k<NUM; k++) ...

2288 views

Responded 2 years ago

I download the num2exact package and use it to show all digits of the results generated by matlab. I shows all numbers in range ...

The compiler I am using is running in 64bit linux system and it uses 64bits to for double precision. The MATLAB I am running is ...

In C++, I use a loop to generate -4:bi:4 double bi=0.2; int NUM = round(8.0/bi)+1; for (int k=0; k<NUM; k++) range[k] = -4 + (d...

The matlab code I shown here is to retrieve the indices of the desired elements based on some condition. I will use those elemen...

Thank James. I think instead of talking how to render the number. Let's consider the a concrete example due to the floating numb...

Hi all, which shows ------------------------------------------------------------------------ -3.0000000000000000000000000000...

Posted 2 years ago

so spdiags will only compress the band matrix but not full-diagonal matrix. My matrix is n-by-n and with nxn-1 diagonal stip so ...

1116 views

I have a square matrix with each diagonal be the same number. For instance, 4x4 matrix [ 1 2 3 4; I am trying to use spdiag...

Hi James,

1037 views

Thanks James. It helps a bit but not much. I try the cell function with ffun = @(n) find( (MT>=X(n)-0.5) & (MT<=X(n)+0.5) ); ...

Hi Nasser,

hi all, for n=1:5000 end this loop is pretty slow. Is that any way to boost the code or achieve the same thing without using t...