两复数乘积C语言,C语言程序(两复数矩阵相乘)改错求助

C语言程序(两复数矩阵相乘)改错求助

哪位高手帮我修改一下下面这段程序的错误,我看了实在是改不出.急用...先谢谢了!

double bucmul(double ar,double ai,double br,double bi,int m,int n,int k,double cr,double ci)

{

int i,j,l,u,v,w;

double p,q,s;

for(i=0;i<=m-1;i++)

for(j=0;j<=k-1;j++)

{u=i*k+j;

cr[u]=0.0; error (C:\Documents and Settings\基地12号\桌面\Text1.c(85) : error C2109: subscript requires array or pointer type

C:\Documents and Settings\基地12号\桌面\Text1.c(85) : errorC2106: '=' : left operand must be l-value)

ci[u]=0.0;

for(l=0;l<=n-1;l++)

{v=i*n+l;

w=l*k+j;

p=ar[v]*br[w]; error (C:\Documents and Settings\基地12号\桌面\Text1.c(90) : error C2109: subscript requires array or pointer type

C:\Documents and Settings\基地12号\桌面\Text1.c(90) : error C2109: subscript requires array or pointer type)

q=ai[v]*bi[w];

s=(ar[v]+ai[v])*(br[w]+bi[w]);

cr[u]=cr[u]+p-q;

ci[u]=ci[u]+s-p-q;

}

}

return(cr,ci);

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值