[SOLVED]which function to do the same as matlab : x=a\b
Hello,
I've recently post a message in the forum because i'm trying to zgels to solve this problem:
matrix A = [1+i*1 2+i*1;
3+i*2 1+i*2;
2+i*3 2+i*1];
matrix B = [2+i*2;
1+i*3;
3+i*1];
x=a\b
answer for x is:
-9.23e-002 -1.076e-001i
1.43 2.61i
I've tried to use zgels to solve this system.
This is a mxn matrix full-range so should repect the usage of the function.
zgels('N',&m,&n,&nrhs,a,&lda,b,&ldb,x,&lwork,&result)
with m=3 n=2 nrhs=1 lda=3 ldb=3 and work = n+max(m,rhs)
but i can't manage get the good result...
I suspected that my array in C were not well written but i've been carefull to fill the memory with reverse order as fortran style...
when i launch my program mkl says taht parameter 9 was incorrect on entry to ZTRSM...
I don't know what to do now...
So my question is:
- is zgels the good function to use???
Thanks you a lot for any help!!
I've recently post a message in the forum because i'm trying to zgels to solve this problem:
matrix A = [1+i*1 2+i*1;
3+i*2 1+i*2;
2+i*3 2+i*1];
matrix B = [2+i*2;
1+i*3;
3+i*1];
x=a\b
answer for x is:
-9.23e-002 -1.076e-001i
1.43 2.61i
I've tried to use zgels to solve this system.
This is a mxn matrix full-range so should repect the usage of the function.
zgels('N',&m,&n,&nrhs,a,&lda,b,&ldb,x,&lwork,&result)
with m=3 n=2 nrhs=1 lda=3 ldb=3 and work = n+max(m,rhs)
but i can't manage get the good result...
I suspected that my array in C were not well written but i've been carefull to fill the memory with reverse order as fortran style...
when i launch my program mkl says taht parameter 9 was incorrect on entry to ZTRSM...
I don't know what to do now...
So my question is:
- is zgels the good function to use???
Thanks you a lot for any help!!