Problem 258. linear least squares fitting
Solution Stats
Problem Comments
-
6 Comments
your functions are not all truly 'vectorized'; I would change @(x)1 to @(x)ones(size(x)) for a more consistent 'vectorized' behavior...
Yup, you're right. I made the adjustment...
not meaning to be picky, but in the third test you might want to use aref.' instead of aref' (if x take negative values, which occurs at random for this test, then log(x) takes complex values, and the aref' portion takes the conjugate of the complex valued results); perhaps it is simpler to make sure x takes only positive values...
and nice problem, by the way!
Thanks! Nice catch, I fixed that second issue too (those randomized tests have their drawbacks)
Sorry, but I can not understand the problem to solve.
Can anyone explain to me, please?
Solution Comments
Show commentsProblem Recent Solvers70
Suggested Problems
-
1134 Solvers
-
How to find the position of an element in a vector without using the find function
2632 Solvers
-
377 Solvers
-
Create a square matrix of multiples
453 Solvers
-
Relative ratio of "1" in binary number
1035 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!