我有名稱AdminController控制器,其中i有方法create_school_head: class AdminsController < ApplicationController
...
def create_school_head
@user = User.new
end
...
end
另外我有視圖create_school_
我開發RoR應用程序,我遇到了我無法解決的事情。我有2個模型 - 用戶和教師。 class User < ActiveRecord::Base
...
has_one :teacher
accepts_nested_attributes_for :teacher
end
class Teacher < ActiveRecord::Base
...
這是關係到how to find out the scaling factors to match two curves in matlab? 我用下面的代碼找出縮放因子來匹配兩條曲線 function err = sqrError(coeffs, x1, y1, x2, y2)
y2sampledInx1 = interp1(coeffs(1)*x2,y2,x1);
err