MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > fminsearch error 

I've written the following code to a least squares fit of a function. I want to find the values of k1 and k2 for which the the function is minimized. 
"M.E.L. " <schrodingers.lyon@gmail.com> wrote in message <hsf1i9$oio$1@fred.mathworks.com>... 
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hsf2v9$r42$1@fred.mathworks.com>... 
"Matt J " <mattjacREMOVE@THISieee.spam> wrote in message <hsf2v9$r42$1@fred.mathworks.com>... 
"M.E.L. " <schrodingers.lyon@gmail.com> wrote in message <hsfbkq$ksb$1@fred.mathworks.com>... 
Wow, you're right ... about everything! This backslash operator will work a LOT better. So let me see if I understand this. I've got some function, Y, that I'm trying to minimize 

Thank you, Steven, for clarifying that for me! That makes more sense. But using the X that you suggested, I get an error when I try to do k=X\A: 

No tags are associated with this thread.
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.