12 2011 档案

摘要:#include <iostream>using namespace std;int main(){ double a[] ={2,2,2, 3,2,4, 1,3,9}; double b[] = {1,0.5,2.5}; double m =0; int n=3; for (int i = 0; i < n-1; i++) { for (int j = i + 1; j < n; j++) { m = a[j*n+i] / a[i*n+i]; ... 阅读全文
posted @ 2011-12-05 21:36 Dsp Tian 阅读(978) 评论(0) 推荐(0) 编辑
摘要:bool isNumber(char s){ if (s >= 48 && s <= 57) return true; else return false;}bool isLetter(char s){ if (s >= 97 && s <= 122) return true; else return false;}//函数的作用是把如“-45+2*a-a^2-4*a^6+a^8”这样的字符串提取成这样:(-45,2,-1,0,0,0,-4,0,1),只提取系数,并根据指数安排起位置.//s为传入的字符串,resu... 阅读全文
posted @ 2011-12-04 14:42 Dsp Tian 阅读(2359) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>using namespace std;void malo(double **p){ *p =new double; double *w=new double[10]; for (int i=0;i<10;i++) { w[i]=2*i; } *p=w;}void main(){ double *m=NULL; malo(&m); for (int i=0;i<10;i++) { cout<<m[i]<<""; } delete[] m; syst... 阅读全文
posted @ 2011-12-04 14:34 Dsp Tian 阅读(1480) 评论(0) 推荐(0) 编辑
摘要:#include <iostream>#include <math.h>using namespace std;int main(){ double a[] = { 4, 2, -2, 2, 2, -3, -2, -3, 14 }; double *L = NULL; double *U = NULL; double tmp=0; int n; //矩阵内总数据个数 int s; //矩阵的阶数 ... 阅读全文
posted @ 2011-12-02 10:50 Dsp Tian 阅读(4357) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示