My matrix sizes have grown beyond what can fit on the RAM but I have a function which defines each element cheaply.Is it possible use BLAS (in Fortran or even in MATLAB) in such cases?If I had a matrix in memory, I could use dgemv or dgemm or whatever and pass my matrix as one of the arguments. Now, I have no matrix. How do I tackle that?I could write my own codes, but no matter what I do, I doubt my programming will be as thorough as the guys up at Intel MKL. There is simply too much to keep track of in such kind of programming.EDIT: My matrix is dense. Almost full dense. I have a function in terms of indices $(i,j)$ and a $10^{6} \times 1$ vector. Like : $$f(i,j) = \frac{|a(i) + a(j)|}{(i-j)^2} $$Also, I'm not saying I must use BLAS. I can use anything similar as long as it gets my job done. But as far as I know, there isn't any other library.
Is it possible to use BLAS if I have a function rather than a matrix?
linear algebra;blas
What do you want to do with this matrix? If you just want to multiply with a vector or another matrix, you should write that code yourself. If you want to factor the matrix, you will have to find the memory to store it. If you want to solve systems or eigenvalue problems, you could use PETSc with MatShell. Depending on the problem, you might need a preconditioner (which you might also be able to implement without assembling, if you like).