拟合n个有序多项式

时间:2016-03-31 22:51:15

标签: matlab matlab-figure polynomials polynomial-approximations

我试图绘制回归曲线:

coef_fit = polyfit(norm_dist,norm_time,7); 
y_fit = polyval(coef_fit,xlim); 
plot(xlim,y_fit,'r');

但它总是在绘制一条与我通过的顺序相对应的线。

1 个答案:

答案 0 :(得分:2)

问题是您使用的 if (password.equalsIgnoreCase(confirm)) { Contact c = new Contact(); // Uses the contact class created earlier c.setName(name); c.setEmail(email); c.setUsername(user); c.setPassword(password); registerDB.insertContact(c); startActivity(new Intent(RegisterActivity.this,LogIn.class)); } else { // Pop up message Toast pass = Toast.makeText(RegisterActivity.this, "Passwords Dont Match!", Toast.LENGTH_SHORT); pass.show(); } } } 值是输出x,它是长度为2的向量。您需要定义具有更多值的xlim向量:

x

enter image description here