#include "stdafx.h"
#include <math.h>
#include <stdio.h>
#include <iostream>
using namespace std;
#ifndef _COORDINATION_LS_2_H_
#define _COORDINATION_LS_2_H_
#define N 3
#define M 3
struct REF{
float x;
float y;
float z;
float r;
};
int MatrixProduct(float *a,float *b,float *c,int lin1,int col1,int lin2,int col2);
int MatrixAddition(float *a,float *b,float *c,int lin1,int col1,int lin2,int col2);
void MatrixReverse(float *a,float *b,int lin,int col);
int MaxOfArray(float *a,int n);
void ExchangeRow(float *array,int row1,int row2,int m);
void SelectMaxElement(float *array,int n,int m,int row);
void GAUSSProcess(float *array,int n,int m,int row);
void GAUSSCaculate(float *array,float *x,int n,int m);
void MatrixMerge(float *A,float *B,float *C,int colomn1,int colomn2);
void SolveEquations(float *a,float *b,float *x,int colomn1);
void LS_2();
#endif
/*****************************************************
*MatrixProduct: 求两个矩阵相乘
*
*******************************************************/
int MatrixProduct(float *a,float *b,float *c,int lin1,int col1,int lin2,int col2)
{
/*
lin1 = LIN1;
col1 = COL1;
lin2 = LIN2;
col2 = COL2;
*/
int i,j,k;
评论5