double ans
double a[],b[]//非常不懂你给的数组a[]中的数是什么,还有要是迭代10就得每个数组都大于10个数字
double iterate(int k)
{
if(k==0)return 0
ans=iterate(k-1)
printf("k=%d ans=%lf\n",k-1,ans)
return ans+(b[k]-a[k]*ans)/(a[k]*a[k])*a[k]//你给的式子越看越别扭a[k]和a[k]能约去啊
}
int main()
{
int a
scanf("%d",&a)
iterate(a+1)
return 0
}
用edge指令----帮助文件-----
EDGE Find edges in intensity image.
EDGE takes an intensity or a binary image I as its input, and returns a
binary image BW of the same size as I, with 1's where the function
finds edges in I and 0's elsewhere.
一个简单的例子 Example
-------
Find the edges of the circuit.tif image using the Prewitt and Canny
methods:
I = imread('circuit.tif')
BW1 = edge(I,'prewitt')
BW2 = edge(I,'canny')
figure, imshow(BW1)
figure, imshow(BW2)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)