你好,我的程序为 bo(i,0) = 0.25*(cos(10*PI*(x-1.5))+1) bo(i,1) = 0.0 bo(i,2) = 0.0 总是有错误 Error: The shapes of the array expressions do not conform. bo(i,0) = 0.25*(cos(10*PI*(x-1.5))+1)
追答
bo(i,0) 没有这个变量的定义法则。。
你可以改为 bo_i_1 这样可以 ,只能是数字,—— 和 字母
本回答被提问者采纳
第3个回答 2014-05-15
#define pi 3.1415926
0.25*(cos(10*pi*(x-1.5))+1)
第4个回答 2014-05-15
#include <iostream> using std::cout; using std::endl; int main() { cout << "0.25(cos(10π(x-1.5))+1)" << endl; }