Friday, October 23, 2009
Thursday, August 13, 2009
Least squares fit
Data for drawing graph is shown below:
x =1 2 3 4
y =1.7 2.8 3.2 4.2
y = a + bx
Fit the data to this equation and find the expected curve.
x =1 2 3 4
y =1.7 2.8 3.2 4.2
y = a + bx
Fit the data to this equation and find the expected curve.
Sunday, November 11, 2007
News
/**
* Write a description of class factorial here.
* Fraction
* @author (your name)
* @version (a version number or a date)
*/
public class factorial
{
int x;
double y;
void display(int n)
{
x=n;
int f=1,i;
int j;
double fact1=1.0;
double sum=0.0;
for(i=1;i<=n;i++)
{
for(j=1;j<=x;j++)
{
fact1=fact1*j;
}
sum=sum+i;
System.out.print(sum+" ");
}
}
double fact()
{
y=fact1;
return y;
}
}
Saturday, November 10, 2007
Microprocessor Program
WAP to find the biggest of three numbers
ORG 0000H
LXI H,0085H
MVI B,03H
MVI A,00H
QQ: CMP M ;IF (A>M),THEN JUMP WITH NO CARRY
JNC PP
MOV A,M
PP: INX H
DCR B
JNZ QQ
STA 0090H
HLT
END
ORG 0085H
DB 28H,03H,38H
ORG 0000H
LXI H,0085H
MVI B,03H
MVI A,00H
QQ: CMP M ;IF (A>M),THEN JUMP WITH NO CARRY
JNC PP
MOV A,M
PP: INX H
DCR B
JNZ QQ
STA 0090H
HLT
END
ORG 0085H
DB 28H,03H,38H
Subscribe to:
Posts (Atom)