WHY DOESN\'T IT WORK? <html><body><script> x = [ 1, 3, 7, 9 ] y = [ 1, 3, -3, 7
ID: 3625765 • Letter: W
Question
WHY DOESN'T IT WORK?
<html><body><script>
x = [ 1, 3, 7, 9 ]
y = [ 1, 3, -3, 7 ]
matrix = [3 * x.length - 3][3 * x.length - 2]
var count = 0;
//insert zero matrix here
row = var [ 3 * x.length - 2 ]
for ( i = 0; i < x.length - 1; i++)
{
matrix [count][i] = x[i] * x[i];
matrix [count][i + x.length - 1] = x[i];
matrix [count][i + (2*x.length) - 2] = 1;
matrix [count][row.length - 1] = y[i];
count++;
matrix [count][i] = x[i + 1] * x[i + 1];
matrix [count][i + x.length - 1] = x[i + 1];
matrix [count][i + (2*x.length) - 2] = 1;
matrix [count][row.length - 1] = y[i + 1];
count++;
}
for ( j = 1; j < x.length - 1; j++)
{
matrix [count] [j - 1] = 2 * x[j];
matrix [count] [j] = -2 * x[j];
matrix [count] [j + x.length - 2] = 1;
matrix [count] [j + x.length - 1] = -1;
count ++;
}
matrix [count] [0] = 1;
count++;
document.write ("a0 =", x[0][9])
document.write ("a1 =", x[1][9])
document.write ("a2 =", x[2][9])
document.write ("a3 =", x[3][9])
document.write ("b1 =", x[4][9])
document.write ("b2 =", x[5][9])
document.write ("b3 =", x[6][9])
document.write ("b4 =", x[7][9])
document.write ("c1 =", x[8][9])
Explanation / Answer
you need to declare the type attribute in your tag as... since you're using javascript.Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.