mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
bug fix - first dimension of matrices points to pointers, hence get pointer size
Signed-off-by: Krishna Vedala <krishna.vedala@ieee.org>
This commit is contained in:
parent
d902f3595f
commit
8aeb36bac8
@ -82,9 +82,9 @@ int main(int argc, char **argv)
|
||||
|
||||
int i, rows = mat_size, columns = mat_size;
|
||||
|
||||
double **A = (double **)malloc(sizeof(double) * mat_size);
|
||||
double **R = (double **)malloc(sizeof(double) * mat_size);
|
||||
double **Q = (double **)malloc(sizeof(double) * mat_size);
|
||||
double **A = (double **)malloc(sizeof(double *) * mat_size);
|
||||
double **R = (double **)malloc(sizeof(double *) * mat_size);
|
||||
double **Q = (double **)malloc(sizeof(double *) * mat_size);
|
||||
|
||||
/* number of eigen values = matrix size */
|
||||
double *eigen_vals = (double *)malloc(sizeof(double) * mat_size);
|
||||
|
Loading…
Reference in New Issue
Block a user