Why is the 'rfinterp1' function creating a jagged line between data points?
Show older comments
I have an S-parameter object for which I am plotting the parameter values. I want to draw a line connecting the data points using linear interpolation. However, when I use the function 'rfinterp1', I see a jagged line instead of a linear one as shown below. Why is this happening?

Example script:
>> y = rfparam(sobj_raw_s4p, 2, 1);
>> x = sobj_raw_s4p.Frequencies;
>> xnew = f_s4p;
>> ynew = interp1(x, y, xnew);
>> figure; hold on; plot(x, db(abs(y)), 'o'); plot(xnew, db(abs(ynew)), '-'); hold off
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!