Rank: 326947 based on 0 downloads (last 30 days) and 0 file submitted
photo

Gwen Weng

E-mail
Company/University
University of Waterloo

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Gwen View all
Updated File Comments Rating
14 Aug 2012 Data Driven Fitting with MATLAB Demostration code and data sets for the "Data Driven Fitting with MATLAB" webinar. Author: Richard Willey

It requires the data to be dense and not have large gaps.

06 Jun 2012 Piecewise functions Evaluate a general piecewise function of one variable Author: John D'Errico

06 Jun 2012 Piecewise functions Evaluate a general piecewise function of one variable Author: John D'Errico

Great, clean design! Thank you!

For anyone who wants symbolic inputs (variables), see the following example:

x = 0:1:20;
k = 0.09;
c = 1.1;
fun_1 = sprintf('(-3.5*exp(-%d*x)+3.5)*%d',k,c);
fun_2 = sprintf('-3.5*exp(-%d*x)+3.5',k);
y = piecewise_eval(x,[15],{fun_1,fun_2});

All you have to do is to make sure the data types are correct.

Contact us