a =
1 2 3
1 3 4
1 4 5
2 5 6
2 6 7
3 7 8
2 8 9
1 0 1
2 1 2
the command:
b = find ( a ( : , 1 )= =2)
returns following results:
b =
4
5
7
9
the coomand:
c= a ( b , : )
returns following results:
c =
2 5 6
2 6 7
2 8 9
2 1 2
This is how to pick out all the rows in which the first element is 2 in matrix a and put them into c. I could have used this to handle my ozone historic data and it will be much easier.
MATLAB applications, tutorials, examples, tricks, resources,...and a little bit of everything I learned ...
Subscribe to:
Post 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...
-
Recently I read post from Dr. Doug Hull's blog: http://blogs.mathworks.com/videos/2009/10/23/basics-volume-visualization-19-defining-s...
-
To get the slope of a pair of x and y, usually I first plot the curve and then add the trend line. Actually there are two functions i...
Nice trick! Helped me! Thanks!
ReplyDelete