Numerical Analysis Questions & Answers  
Question by Student 201527151
Professor, when we use function of sin(x), we include<math.h> library and also write a function code of
double sin(double x){
    double ret;
    ret = sin(x);
    return ret;
}
. However, the code still doesn't work, and when I compile, it says: undefined reference to 'sin'. Is there something else we should add to a code about sin then?
10.04.16
I don't understand. Are you trying to code a sin(x) function? If so, there is no need to code it because the function sin(x) is already defined in the math library.
Question by Student 201129143
Professor, I wrote $$LX'=B$$ "Back substitution, but starting from top" on note. But another book say that this process is Forward substitution. So I wonder that what is the different.
10.10.16
You can call it forward substitution if you wish, this is the correct term. In class, I mentioned that this is the same process as back substitution (but going from top to bottom rather than bottom to top) to make it clear that this is not a new type of process. I'll give you 1.5 point bonus boost for sharing this with the class.
Question by Student 201327116
Professor, Assignment #3 Q#1 (b) In C, We can solve by using the upper triangular. In Compile, The denominator is zero when there is the problem What ever it is that you can use when the denominator is zero?
10.14.16
Are you getting the same problem when solving it by hand? If not, then it means there is a bug in your C code. If yes, then outline the problem in another question below.
Question by Student 201327107
Professor, I learned partial pivoting in order to prevent possible division by 0. As a result, for 4 rows and one column of A matrix is ​​0 in Assignment3 Q1, then should I have to use partial pivoting in C code and by hand?
10.16.16
No, you shouldn't be using pivoting here because the question asks to use Gaussian elimination. Double check your solution: if you think there is a mistake in the question formulation then outline your full solution below in until the problem occurs and I will check it.
Question by Student 201327107
In Assignment3 Question1 (b) $$int main()$${ $$ $$ $$for(row=0;row<N;row++)$${ $$for(row2=row+1;row2<N;row2++)$${ $$assert(A[row2]A[row]!=0.0);$$ $$fact=-A[row]A[row]/A[row2]A[row];$$ In code when $row=0$,$row2=3$, then $A[row2][row]$ is zero. So compile is stop. I think row4,col1 of matrix A that should not be the zero.
10.17.16
No, I asked that you post the solution by hand and show at which step there is a problem (using ).
Previous   1 ,  2 ,  3 ,  4  ...  14    Next  •  PDF 1✕1 2✕1 2✕2
$\pi$