ic = interactive_curve;Once you have created a curve, you can create vectors by interpolating:
x = 0:0.01:20; y = ic.interpData(x, true); % 'true' indicates that the signal should be periodic figure; plot(x, y);or you can even create a function that you can use to evaluate at any arbitrary point:
function yi = mySignal(xi) % autogenerated interpolation function 23-Feb-2012 19:38:50 % by interactive_curve object
xi = mod(xi-(0.0000000e+000),1.0000000e+001); x = [1.5000000e-001 1.4861751e+000 2.8225806e+000 3.9976959e+000 ... 4.7811060e+000 6.2327189e+000 7.2695853e+000 8.0299539e+000 ... 9.0000000e+000 1.0000000e+001]; y = [-3.0701754e-003 -3.0701754e-003 -4.6359649e-001 6.1096491e-001 ... 3.0394737e-001 4.9429825e-001 8.5657895e-001 2.7324561e-001 ... 0.0000000e+000 0.0000000e+000]; yi = interp1(x, y, xi, 'pchip');Maxim has included several examples, a couple of which involve graphical user interfaces. He also has a YouTube video of it in action. Thanks for a very useful tool, Maxim! Comments Give it a try and let us know what you think here or leave a comment for Maxim.
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.