I'm attempting to run a function, but ignore a certain element within my vector. I've looked online, but most of the answers actually outright remove the element(s) in question, rather than having the function ignore them.
Here is the basic setup:
X = [ones(3,1) magic(3)];
y = [1 0 1]';
theta = [-2 -1 1 2]';
with my equations:
Now in the above setup, I don't want to use theta0 values (i.e. theta(1,1) and X(:,1))
My original solution was to outright remove it:
This doesn't work however, because the function is assuming you are using the original size of X and theta (and I am now using b and c, which are different size vectors and matrices). So what I want to do is simply ignore the certain elements within my vector and matrix, but I don't want to eliminate them (i.e. create a new differently sized matrix/vector). All the stuff I've seen so far eliminate the actual value using the same logic as the above technique I tried.