Example:
a=
1 2 3
4 5 6
7 8 9
a=a(:)
->
a=
1
4
7
2
5
8
3
6
9
MATLAB applications, tutorials, examples, tricks, resources,...and a little bit of everything I learned ...
Thursday, July 23, 2009
Matlab: Remove all the unwatned elements in matrix
Today I just got a big set of data, the record of ozone level for one year. When the data is bad or there is no data for a certain point of time , they just use a 999. So I want to remover all of the 999s in this matrix.
If use Excel, that's easy- Find and Replace. In matlab, what I did is this:
Matrix=Matrix(Matrix ~=999)
Here's a simpler example:
If use Excel, that's easy- Find and Replace. In matlab, what I did is this:
Matrix=Matrix(Matrix ~=999)
Here's a simpler example:
a=[1 2 3 4 5 6 7 8 9 ];
b=a(a~=4);
->
b=[1 2 3 5 6 7 8 9]
Wednesday, July 15, 2009
Casio FX4500PA Calculator User Manual Download
I got a Casio fx4500PA calculator several years ago, but I just use it for the simplest calculation. And today I realized that it might be interesting if I do some more complicated job on this calculator. So I found this user manual and it can tell me how to do INTEGRATION and other programming on it. It's pretty cool.
Here's the link to download the user manual:
Casio FX4500PA Calculator User Manual Download
Here's the link to download the user manual:
Casio FX4500PA Calculator User Manual Download
Monday, July 6, 2009
Wednesday, July 1, 2009
Calculate Sequence and Sum
For a(1)=sqrt(2) and a(n+1)=sqrt(2+sqrt(n)), calculate the sequence and sum for n=10.
clc; clear all; close all;
format long;
a=[];
S=[];
a(1)=sqrt(2);
for k=2:11
a(k)=sqrt(2+a(k-1))
end
a=a';
for m=1:k
S(m)=sum(a(1:m));
end
clc; clear all; close all;
format long;
a=[];
S=[];
a(1)=sqrt(2);
for k=2:11
a(k)=sqrt(2+a(k-1))
end
a=a';
for m=1:k
S(m)=sum(a(1:m));
end
Subscribe to:
Posts (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...