http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4808
Background
If thou doest well, shalt thou not be accepted? and if thou doest not well, sin lieth at the door. And unto thee shall...
分类:
其他好文 时间:
2015-02-04 18:37:27
阅读次数:
154
效果图:
在matlab中,作图是重要的一部分,那么对于三维的图像,如何将静态的改为动态的呢?
首先,静态图的代码:
t=0:0.1:20;
i=(1:200);
%这里只是画了一个点'*'而已, 因为i取值为1.
h=plot3(sin(t(i)),cos(t(i)),t(i),'*','erasemode','none');
grid on % 网格化:即显示坐标轴...
分类:
其他好文 时间:
2015-02-04 11:06:15
阅读次数:
772
说明:1.本问题来源于《C语言经典、趣味、实用程序设计编程百例精解》,所有程序为本人自己编写。与原程序不同之处作有标记。 2.本系列所有程序均使用codeblocks编译,操作系统为Windows XP。问题:在屏幕上用“*”显示0~360度的正弦函数sin(x)曲线(不使用数组)分析:同余弦...
分类:
其他好文 时间:
2015-02-03 14:53:13
阅读次数:
117
$$\bex \frac{2}{\pi}\int_0^\infty \frac{1-\cos 1\cos \lm-\lm \sin 1\sin \lm}{1-\lm^2}\cos \lm x\rd \lm \eex$$
分类:
其他好文 时间:
2015-02-03 09:21:38
阅读次数:
129
Problem F
Solve It
Input: standard input
Output: standard output
Time Limit: 1 second
Memory Limit: 32 MB
Solve the equation:
p*e-x+ q*sin(x) + r*cos(x) + s*tan(x) + t*x2 + u = 0
...
分类:
其他好文 时间:
2015-02-02 18:17:29
阅读次数:
151
ParametricGeometry用来在三维空间内通过参数func的定义,生成一个几何体.有了这个对象,各种你想要的集合体,发挥你的数学天赋吧.
用法:
var func = function(u,v){
var point = new THREE.Vector3();
point.x = 100 + Math.cos(u);
point.y = 100 + Math.sin(v);
return point;
};
var geometry ...
分类:
Web程序 时间:
2015-02-01 12:13:22
阅读次数:
298
LatheGeometry类通过截面顶点数组(points)创建旋转几何体.
用法:
var points = [];
for ( var i = 0; i < 10; i ++ ) {
points.push( new THREE.Vector3( Math.sin( i * 0.2 ) * 15 + 50, 0, ( i - 5 ) * 2 ) );
}
var geometry = new THREE.LatheGeometry( points );
var mater...
分类:
Web程序 时间:
2015-01-31 12:56:13
阅读次数:
166
教大家一个简单的向MIF文件中导入数据的办法。以2048点8位正弦波数据为例(最小值0,最大值200)。1.打开MATLAB,键入公式clearx = 1:2048;y = floor(100*(sin(2*pi*x/2048)+1));2.打开工作区变量y3.复制工作区数据4.在Quartus I...
分类:
其他好文 时间:
2015-01-31 07:03:33
阅读次数:
178
0)Eager initialization如果程序一开始就需要某个单例,并且创建这个单例并不那么费时,我们可以考虑用这种方式:123456789public class Singleton { private static final Singleton INSTANCE = new Sin...
分类:
其他好文 时间:
2015-01-30 15:09:08
阅读次数:
166
1、三维曲线用到了plot3函数。plot3(x,y,z)用来绘制3维曲线图,而不能绘制曲面图!就是把所有的(x,y,z)点连接在一起。t=linspace(0,10*pi,2000); x=sin(t); y=cos(t); z=t; plot3(x,y,z)2、网格曲面meshgrid是MATL...
分类:
其他好文 时间:
2015-01-30 06:35:54
阅读次数:
233