产生方波cleart=0:0.01:10;subplot(4,1,1)f1=square(t); % 产生周期为2pi的方波信号plot(t,f1)axis([0,10,-1.2,1.2])subplot(4,1,2)f2=square(t,30); % 产生周期为2pi,占空比为3...
分类:
其他好文 时间:
2014-10-27 00:24:43
阅读次数:
169
As a simple way to play with functions and loops, implement the square root function using Newton's method.In this case, Newton's method is to approxi...
分类:
其他好文 时间:
2014-10-27 00:18:38
阅读次数:
219
本文大纲一、简介二、环境说明及配置三、测试四、常见问题解决###############一、简介NTP服务器【NetworkTimeProtocol(NTP)】是用来使计算机时间同步化的一种协议,它可以使计算机对其服务器或时钟源(如石英钟,GPS等等)做同步化,它可以提供高精准度的时间校正(LAN上与标..
分类:
其他好文 时间:
2014-10-25 18:53:08
阅读次数:
221
Spiral Matrix IIGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should retu...
分类:
其他好文 时间:
2014-10-24 12:35:31
阅读次数:
259
Given an integer n, generate a square matrix filled with elements from 1 to n2 in
spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9, 4 ],
[...
分类:
其他好文 时间:
2014-10-23 12:31:39
阅读次数:
132
Implement int sqrt(int x).
Compute and return the square root of x.
二分法,当无法求得准确值时,去较小值,(同时是最接近的)
public class Solution {
public int sqrt(int x) {
if(x<1) return 0;
int left = 1;
...
分类:
其他好文 时间:
2014-10-22 18:17:03
阅读次数:
228
clf;[X,Y,Z]=sphere(40);colormap(jet)subplot(1,2,1),surf(X,Y,Z),axis off square,shading interplight('position',[0 -10 1.5],'style','infinite')material ...
分类:
其他好文 时间:
2014-10-22 12:26:53
阅读次数:
221