Message Boards Message Boards

0
|
2719 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

LinearSolve dimensions Error

Posted 11 years ago
My Assignment is to set up and solve a system of equations to generate the coefficients of a quadratic (degree 2) interpolating polynomial for the population of Nebraska in the years 1900, 1950, and 2000 was 1,066,000, 1,326,000, and 1,713,000, respectively.

What does this error mean and how do I fix it?
LinearSolve::lslc: Coefficient matrix and target vector(s) or matrix do not have the same dimensions. >>

MatrixForm[ A = {{1, 1900, 1900^2}, {1, 1950, 1950^2}, {1, 2000, 2000^2}}]
MatrixForm[b = {{1066000, 1326000, 1713000}}]
x = LinearSolve[A, b]
then I get the error
POSTED BY: Kyle Lammers
2 Replies
Posted 11 years ago
O okay. Thank you.
POSTED BY: Kyle Lammers
In this case it means your rhs fails to have the correct dimension. It should be either a vector of 3 elements, or a matrix with 3 rows and any nymber of columns. What you have is matches neither of these.
POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract