Q:

Octave operator \ error

I'm working in GNU Octave and i need to solve the following equation: A*x=b (A, x, b are matrix).  
A = [1 1; 2 1];
b = [1, 2];

So i'm doing x = A \ b according to my guidelines.  But I get an error:
operator \: nonconformant arguments (op1 is 2x2, op2 is 1x2)

I understand what it means, but don't know how to fix this.  I've already tried inv(A) * b.

By the way it works perfectly in matlab.  Here is my script:
A = input('Enter A');
b = input('Enter b');
x = A \ b;
display(x);

A:

The problem is with the dimension of b it should be columns rather than a row. 
x = A\b.'; 
% or for clarity
x = A\transpose(b);

Edit:
If you use inv again you need to use the correct dimensions:
x = inv(A)*b.'; 
% or for clarity
x = inv(A)*transpose(b);

