I would like to know how to put a vector into function's argument. Let the user enters a vector x=[x1 x2] and the coefficients a, b. And our task would be for example to plot a graph of a linear function a*x+b, where x=[x1 x2]. I thought that the beginning might look like this:
function L = linear([x1 x2], a, b)
....
y = [x1 x2] * a + b
plot ([x1 x2], y)
Unfortunately, it is all wrong. Matlab still reports ERROR. Help. Thanks