I'd like to approximate fitting curve some kind of curves like below. (1, 3.5), (2, 4.3), (3, 7.2), (4, 8) which is having 4 points.
and I heard that this solver is PINV() of matlab function. But I don't know how to use.
Would you please let me know how to use and find a approximation fitting curve equation?



If you want a polynomial fit, you can use the function polyfit. In your case you would use
where d is the degree of the desired polynomial (where $d \in \{ 0,1,\dots,n-1 \}$ and $n$ is the number of data points). polyfit then gives the coefficients $a_d,a_{d-1},\dots,a_0$ of the polynomial $a_d x^d + \dots + a_0$, in that order. So if you had d=2 and a desired evaluation point x0, then you could evaluate this way:
There are at least two better ways to do it (Horner's method is one; a vectorized version of the above is another), but it's fine to do it the simple way in a small case like this.
More generally, suppose you have a model of the form $y=\sum_{j=1}^n c_j f_j(x)$ for known functions $f_j$ and unknown coefficients $c_j$, and data points $(x_1,y_1),\dots,(x_n,y_n)$. Then you can assemble the (usually overdetermined) linear system which is given by $y_i=\sum_{j=1}^n c_j f_j(x_i)$. So this looks like $Ac=y$, where $A$ is a matrix with $a_{ij}=f_j(x_i)$. In MATLAB this system (overdetermined or uniquely determined) can be solved with the backslash operator as
(If the system is underdetermined, this will still give a result, but you typically want to do something different in the underdetermined case.)