我试图绘制回归曲线:
coef_fit = polyfit(norm_dist,norm_time,7);
y_fit = polyval(coef_fit,xlim);
plot(xlim,y_fit,'r');
但它总是在绘制一条与我通过的顺序相对应的线。
答案 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