CE20230 Lecture Notes - Lecture 6: Power Law, Environmental Engineering
Document Summary
Department of civil and environmental engineering and earth sciences. This brief worksheet goes over the details of how we determine the non linear model using the results of our linear tting in matlab. >> y = exp(r(2))*x. ^r(1) we note that the data should look fairly linear on a log log plot, i. e. >> loglog(x,y: if we wish to t an exponential model y = bemx we t the following. >> y = r(1)*log(x)+r(2) we note that the data should look fairly linear on a semilog x plot, i. e. >> semilogx(x,y: if we wish to t a reciprocal model y = 1 mx + b we t the following. >> y = 1. /(r(1)*x+r(2)) we note that the data should look fairly linear on a reciprocal rectilinear plot, i. e. >> plot(x,1. /y) Note that for plotting we don"t alter the data, we just use a di erent plot command. Its only when using poly t that we alter the data.