Scilab 5.4.1
- Scilab help
- CACSD (Computer Aided Control Systems Design)
- Formal representations and conversions
- Plot and display
- abinv
- arhnk
- arl2
- arma
- arma2p
- arma2ss
- armac
- armax
- armax1
- arsimul
- augment
- balreal
- bilin
- bstap
- cainv
- calfrq
- canon
- ccontrg
- cls2dls
- colinout
- colregul
- cont_mat
- contr
- contrss
- copfac
- csim
- ctr_gram
- damp
- dcf
- ddp
- dhinf
- dhnorm
- dscr
- dsimul
- dt_ility
- dtsi
- equil
- equil1
- feedback
- findABCD
- findAC
- findBD
- findBDK
- findR
- findx0BD
- flts
- fourplan
- freq
- freson
- fspec
- fspecg
- fstabst
- g_margin
- gamitg
- gcare
- gfare
- gfrancis
- gtild
- h2norm
- h_cl
- h_inf
- h_inf_st
- h_norm
- hankelsv
- hinf
- imrep2ss
- inistate
- invsyslin
- kpure
- krac2
- lcf
- leqr
- lft
- lin
- linf
- linfn
- linmeq
- lqe
- lqg
- lqg2stan
- lqg_ltr
- lqr
- ltitr
- macglov
- minreal
- minss
- mucomp
- narsimul
- nehari
- noisegen
- nyquistfrequencybounds
- obs_gram
- obscont
- observer
- obsv_mat
- obsvss
- p_margin
- parrot
- pfss
- phasemag
- plzr
- pol2des
- ppol
- prbs_a
- projsl
- reglin
- repfreq
- ric_desc
- ricc
- riccati
- routh_t
- rowinout
- rowregul
- rtitr
- sensi
- sident
- sorder
- specfact
- ssprint
- st_ility
- stabil
- sysfact
- syslin
- syssize
- time_id
- trzeros
- ui_observer
- unobs
- zeropen
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
reglin
Linear regression
Calling Sequence
[a,b,sig]=reglin(x,y)
Description
solve the regression problem y=a*x+ b in the least square sense.
sig
is the standard deviation of the residual. x
and y
are two matrices of size x(p,n)
and y(q,n)
, where n
is the number of samples.
The estimator a
is a matrix of size (q,p)
and b
is a
vector of size (q,1)
Examples
// simulation of data for a(3,5) and b(3,1) x=rand(5,100); aa=testmatrix('magi',5);aa=aa(1:3,:); bb=[9;10;11] y=aa*x +bb*ones(1,100)+ 0.1*rand(3,100); // identification [a,b,sig]=reglin(x,y); max(abs(aa-a)) max(abs(bb-b)) // an other example : fitting a polynomial f=1:100; x=[f.*f; f]; y= [ 2,3]*x+ 10*ones(f) + 0.1*rand(f); [a,b]=reglin(x,y)
See Also
Report an issue | ||
<< projsl | CACSD (Computer Aided Control Systems Design) | repfreq >> |