Visual Basic 6.0可以通过调用API函数格式化一个磁盘,无论是软盘还是硬盘。 打开一个新的项目(工程1) ,如果你没有更改过缺省模式,那么Visual Basic 6.0会自动添加一个form1文件,在form1上添加一个命令控件,将下面的代码拷入。 Option Explicit Private Declare Function SHFormatDrive Lib"shell32"( ByVal Hend AS Long,ByVal Drive AS Long,ByVal FormatID AS Long,ByVal Options AS Long) as Long Private Sub FormatDisk(intDrive as integer,blnQuickFormat as Boolean) dim lngReturn As Long if (blnQuickFormat) then lngReturn= SHFormatDrive(0,intDrive,0&,1&) else lngReturn= SHFormatDrive(0,intDrive,0&,0&) end if end Sub Private Sub Command1_Click() call FormatDisk(0,True) End Sub 运行此程序。 注意FormatDisk函数的第一个变量很重要,他的值是0,1,2时代表格式化的分别是:A、B、C盘。
上传时间: 2015-10-05
上传用户:kytqcool
Generate 100 samples of a zero-mean white noise sequence with variance , by using a uniform random number generator. a Compute the autocorrelation of for . b Compute the periodogram estimate and plot it. c Generate 10 different realizations of , and compute the corresponding sample autocorrelation sequences , and . Compute the average autocorrelation sequence as and the corresponding periodogram for . d Compute and plot the average periodogram using the Bartlett method. e Comment on the results in parts (a) through (d).
标签: zero-mean Generate sequence variance
上传时间: 2016-03-04
上传用户:朗朗乾坤
var matlab:variant //通过"变体"调用接口是比较低效的,但很方便 begin //变体这种结构,本是vb中的东西。 try //如果已有活动的matlab.application对象,取其接口 matlab:=GetActiveOleObject( Matlab.Application ) except //这些个api所使用到的参数,其实都可以在注册表里搜索到. matlab:=CreateOleObject( Matlab.Application ) //否则自己创建之 matlab:=CreateOleObject( Matlab.Application.5 ) matlab.execute( a=[1 1/ 3 1/5] ) //matlab.application接口具有 matlab.execute( b=[3 1 1/3] ) //这种方法(接口),否则会出错 matlab.execute( plot(a,b) );
上传时间: 2013-12-18
上传用户:dapangxie
用双向链表实现任意位数的正负整数或小数的加法、减法和乘法运算以及对文件的相关操作。 文件说明: 给定的文件a*.txt为第一个数,b*.txt为第二个数,要求加法产生的结果存储在add*.txt中,减法产生的结果存储在sub*.txt中,乘法产生的结果存储在mult*.txt中,*为对应的一组数据。
上传时间: 2014-01-09
上传用户:zhouchang199
P3.20. Consider an analog signal xa (t) = sin (2πt), 0 ≤t≤ 1. It is sampled at Ts = 0.01, 0.05, and 0.1 sec intervals to obtain x(n). b) Reconstruct the analog signal ya (t) from the samples x(n) using the sinc interpolation (use ∆ t = 0.001) and determine the frequency in ya (t) from your plot. (Ignore the end effects.) C) Reconstruct the analog signal ya (t) from the samples x (n) using the cubic spline interpolation and determine the frequency in ya (t) from your plot. (Ignore the end effects.)
标签: Consider sampled analog signal
上传时间: 2017-07-12
上传用户:咔乐坞
批处理感知器算法的代码matlab w1=[1,0.1,1.1;1,6.8,7.1;1,-3.5,-4.1;1,2.0,2.7;1,4.1,2.8;1,3.1,5.0;1,-0.8,-1.3; 1,0.9,1.2;1,5.0,6.4;1,3.9,4.0]; w2=[1,7.1,4.2;1,-1.4,-4.3;1,4.5,0.0;1,6.3,1.6;1,4.2,1.9;1,1.4,-3.2;1,2.4,-4.0; 1,2.5,-6.1;1,8.4,3.7;1,4.1,-2.2]; w3=[1,-3.0,-2.9;1,0.5,8.7;1,2.9,2.1;1,-0.1,5.2;1,-4.0,2.2;1,-1.3,3.7;1,-3.4,6.2; 1,-4.1,3.4;1,-5.1,1.6;1,1.9,5.1]; figure; plot(w3(:,2),w3(:,3),'ro'); hold on; plot(w2(:,2),w2(:,3),'b+'); W=[w2;-w3];%增广样本规范化 a=[0,0,0]; k=0;%记录步数 n=1; y=zeros(size(W,2),1);%记录错分的样本 while any(y<=0) k=k+1; y=a*transpose(W);%记录错分的样本 a=a+sum(W(find(y<=0),:));%更新a if k >= 250 break end end if k<250 disp(['a为:',num2str(a)]) disp(['k为:',num2str(k)]) else disp(['在250步以内没有收敛,终止']) end %判决面:x2=-a2*x1/a3-a1/a3 xmin=min(min(w1(:,2)),min(w2(:,2))); xmax=max(max(w1(:,2)),max(w2(:,2))); x=xmin-1:xmax+1;%(xmax-xmin): y=-a(2)*x/a(3)-a(1)/a(3); plot(x,y)
上传时间: 2016-11-07
上传用户:a1241314660
1. 编写M程序,利用图像点运算的线性函数:G = aF + b, 给出a、b的不同值,改变图像的对比度、亮度以及图像反相的效果。 2. 利用“二值图像与原图像做点乘,得到子图像”的原理.,编写M程序,构造特殊的二值图像,最终得到需要的子图像。 3. 编写M程序,实现两个大小不同图像的叠加。 4,(提高题)编写M程序,实现图像的动态平移。
上传时间: 2017-05-10
上传用户:mouroutao
在包 hugeinteger 中创建功能类 HugeInteger,该类用来存放和操作一个不超过 40 位的大整数。 (1) 定义一个构造函数,用来对大整数进行初始化。参数为一个字符串。 (2) 定义 input 成员函数,实现大整数的重新赋值。参数为一个字符串,无返回 值。 (3) 定义 output 成员函数,将大整数输出到屏幕上。无参数无返回值。 (4) 定义 add 成员函数,实现两个大整数的加法。参数为一个 HugeInteger 对 象,无返回值,例如: HugeInteger A = new HugeInteger("12345"); HugeInteger B = new HugeInteger("1234"); A.add(B); 此时,A 为 13579,B 为 1234。 (5) 定义 sub 成员函数,实现两个大整数的减法。参数和返回值同 add 函数。 (6) 定义若干大整数关系运算的成员函数,包括 isEqualTo(等于,=)、 isNotEqualTo(不等于,≠)、isGreaterThan(大于,>)、isLessThan(小 于,<)、isGreaterThanOrEqualTo(大于等于,≥)和 isLessThanOrEqualTo (小于等于,≤)。这些函数的参数为一个 HugeInteger 对象,返回值为一个 布尔类型,表示关系运算的结果,例如: HugeInteger A = new HugeInteger("12345"); HugeInteger B = new HugeInteger("1234"); 那么此时 A.isGreaterThan(B)的结果应当为 True,表示 12345>1234。
上传时间: 2019-06-01
上传用户:idealist
1.据估计,地球上的绿色植物通过光合作用每年能结合来自CO2中的碳1500亿吨和来自水中 的氢250亿吨,并释放4000亿吨氧气。光合作用的过程一般可用下式表示: CO2 + H2O + 微量元素(P、N等) (蛋白质、碳水化台物、脂肪等)+O2 SHAPE \* MERGEFORMAT 光能 叶绿素 下列说法不正确的是 A.某些无机物通过光合作用可转化为有机物 B.碳水化合物就是碳和水组成的化合物
上传时间: 2019-09-11
上传用户:hnjhnjhnj
In this thesis several asp ects of space-time pro cessing and equalization for wire- less communications are treated. We discuss several di?erent metho ds of improv- ing estimates of space-time channels, such as temp oral parametrization, spatial parametrization, reduced rank channel estimation, b o otstrap channel estimation, and joint estimation of an FIR channel and an AR noise mo del. In wireless commu- nication the signal is often sub ject to intersymb ol interference as well as interfer- ence from other users.
标签: Communications Space-Time Processing Wireless for
上传时间: 2020-06-01
上传用户:shancjb