Given these 2 formulas of y =....... which are dependent on the number of atoms.length, and they appear to be consistantly applied, I want to make the formulas appear so that as the number of atoms.length increased causes the formula y =....... to expand accordingly.
This is demonstrated in the two situations below:
............. start of snip
int atmlength = atoms.length;
if (atmlength == 3) // 2nd degree
{
y = Float.parseFloat(atoms[atoms.length-1]) +
expertmb,
Thanks for your java statements .
Surprised that some of the punctuation is missing like ";".
Still none of the statements above fill the bill.
int atmlength = atoms.length;
float x = 0.5f;
float y = Float.parseFloat(atoms[atmlength-1]);
for(int i = 2; i <=atmlength ; i++){
System.out.println(atoms[atoms.length-i]);
y+= (Float.parseFloat(atoms[atoms.length-i]))*x;
}
int atmlength = atoms.length;
float x = 0.5f;
float y = 0.0f;//Float.parseFloat(atoms[atmlength-1]);
for(int i = atmlength; i >1 ; i--){
y= (y + (Float.parseFloat(atoms[atoms.length-i])))*x;
}
.........
while (gofrmX <= gotoX )
{
if (atmlength == 3) // 2nd degree
{
y = Float.parseFloat(atoms[atoms.length-1]) +
gofrmX*(Float.parseFloat(atoms[atoms.length-2]) +
gofrmX*Float.parseFloat(atoms[atoms.length-3]));
}
if (atmlength == 4) // 3rd degree
{
y = Float.parseFloat(atoms[atoms.length-1]) +
gofrmX*(Float.parseFloat(atoms[atoms.length-2]) +
gofrmX*(Float.parseFloat(atoms[atoms.length-3]) +
gofrmX*Float.parseFloat(atoms[atoms.length-4])));
}
System.out.print("Value for y is " + y);
if( y < 0 ){
...........
the new replacement will be:
........
while (gofrmX <= gotoX )
{
y = 0;
float yC = Float.parseFloat(atoms[atoms.length-1]);// constant term
System.out.println ("Constant term "+ yC);
for(int i = atmlength; i >1 ; i--){
y = (y + (Float.parseFloat(atoms[atoms.length-i])))*gofrmX;
}
y= y + yC; // adding in the constant term
System.out.print ("total y = "+ y);
if( y < 0 ){
........
I am now able to do any number set of terms (well, maybe), thanks to you.
I am sure that this whole problem and revisions will not buy anyone a cup of coffee at any restaurant
Thanks to you I now have the formula. Your efforts are signinficant to me and I appreciate it.
My remark about the cup of coffee at a restaurant is an expression that means: for the average man in the street, I could offer him my Java program and he would more that likely react by saying "so what, is this program important to my life? and if it is I will buy you a cup of coffee at the restaurant". More than likely I could not convince him.
Again many thanks to you. You should have the points and the grade.
expertmb,
the answer is that it did not hurt. I am very concerned that you understood me with the correct meaning.
This cross cultural thing is very important to me and I thought after the "???" you deserved an better explanation.
Sometimes thoughts come into my head, and out on to the screen too fast. I should run my thoughts into the cross cultural filter. As you can see I am running that filter now :)
The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.
y+= Float.parseFloat(atoms[ato
}