Just found this trick today.
When using:
regstats(y,x)
Matlab will use the linear model y=ax+b model to fit the data and calculate all relevant statistical parameters.
But sometimes we want to fix the trend line through zero, (0,0). In these case, this trick will help:
regstats(y,x,1)
Now Matlab will use the linear model y=ax model to fit the data and calculate all relevant statistical parameters.
Don't know why. But it is tested on R2010b version and confirmed by comparing with Excel calculation results.
MATLAB applications, tutorials, examples, tricks, resources,...and a little bit of everything I learned ...
Subscribe to:
Comments (Atom)
my-alpine and docker-compose.yml
``` version: '1' services: man: build: . image: my-alpine:latest ``` Dockerfile: ``` FROM alpine:latest ENV PYTH...
-
It took me a while to figure out how to insert a space in Mathtype equations. This is especially useful when you write an equation with mult...
-
In this post, I am trying to solve the problem given in the comments of one of the old post. Here's the problem, if I understand it co...
-
Recently I got a very long column of data and it contains lots of NaN. I found the finite function very useful to help me remove all the NaN...