Skip to content
View in the app

A better way to browse. Learn more.

Tip.It Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with some MATLAB code

Featured Replies

I've made this code

x=[1.02,.95,.87,.77,.67,.56,.44,.3,.16,.01]';
y=[.38,.32,.27,.22,.18,.15,.13,.12,.13,.15]';
plot(x,y)
x2=x.^2;
A=[y.^2,x.*y,x,y,ones(10,1)];
z=A\x2
hold on

xp=0:.001:1;
yp=0:.001:1;

plot(z(1)*yp.^2+z(2)*xp.*yp+z(3)*xp+z(4)*yp+z(5),xp.^2)

It's supposed to solve the equation a*y^2 + b*x*y + c*x + d*y + e = x^2 using least squares and then plot the solution together with the actual measured values (x and y). Why is the least squares solution a bit of? I suppose I've made some error somewhere.

matl.png

namnlskopia.jpg

Sweet code bro. Too bad I'm not interested in buying a 400 dollar license to help you out, and I don't think anyone else is willing to either.

 

Can you use an open source alternative like Gretl?

 

And what is the estimated value of your residuals?

newsigh.jpg

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.