If you mean Simulink when you say Matlab, then you are looking for something like the 1-D lookup table block. If just Matlab without Simulink you are looking for interp1 probably.
I measured impedance amplitude and phase of a material in terms of frequency. I want to fit an RC electrical model to the measured data and obtain R and C in terms of frequency. How can I do it (Not in Simulink)?
You can store the values of f, Z and phi in 3 arrays, then use 2 separate interp1 lookup calls to get Z vs f and phi vs f. Find interp1 in the matlab help it will explain and give you an example.