文件名称:matlabmatrix
-
所属分类:
- 标签属性:
- 上传时间:2008-10-13
-
文件大小:920byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
1) Write a function reverse(A) which takes a matrix A of arbitrary dimensions as input and returns a matrix B consisting of the columns of A in reverse order. Thus for example, if
A = 1 2 3 then B = 3 2 1
4 5 6 6 5 4
7 8 9 9 8 7
Write a main program to call reverse(A) for the matrix A = magic(5). Print to the screen both A and reverse(A).
2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output:
Enter k>0: 100
144 is the smallest fibonacci number greater than or equal to 100.
It is the 12th fibonacci number.
A = 1 2 3 then B = 3 2 1
4 5 6 6 5 4
7 8 9 9 8 7
Write a main program to call reverse(A) for the matrix A = magic(5). Print to the screen both A and reverse(A).
2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output:
Enter k>0: 100
144 is the smallest fibonacci number greater than or equal to 100.
It is the 12th fibonacci number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
reverse/reverse.m
fibonacci.m
reverse
www.dssz.com.txt
fibonacci.m
reverse
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.