How to use polyval

One of the easiest and most useful tools in Matlab is polyval, a very nice function that evaluates a polynomial function given its parameters and the range to evaluate… huh? All right, all right, we wanna be clear here, right?

polyval_matlab

Suppose we are given a polynomial function, let’s say:

f(x) = 3x^3 + 4x + 2

and we would like to represent it in Matlab like that. Well, we cannot just write it like that. Remember Matlab is a numerical computation programm, which means, that it won’t compute any symbol. So forget it if you wanna computate something writting letters. Matlabs wants only numbers. You might put names to the variables, but still, Matlab computes only with numbers.

Now, what to do? There’s where our great friend polyval comes to the rescue! Continue reading

The best Octave tutorial

Yes, as the title says, the best Octave tutorial out there is the one made by Professor Andrew Ng from Stanford. He started his world-famous Coursera almost two years ago. Now is one of the most successful companies in the world, why? Because it really gives what it promises and more: makes you understand Science.

Well, well go deep on it by yourself. These videos down are one of the first videos that Profr. Ng made for the course “Machine Learning”. I took it a year ago in its original website ml-class.org and it amazed me. I understood everything and didn’t have to smash my head to do so.

One of the chapters of his class was about handling Octave, the best free substitute for Matlab. Are you eager to master these computing tools? Dive into Octave next to Professor Ng. I promise you will be also amazed by the clear and concise way he teaches. This, my dear people, is the best Octave tutorial ever:

Part 1:
Continue reading