Archive for May, 2007

Labview MathScript Online demo

Wednesday, May 30th, 2007

Labview 1+1

The graphical programming tool, Labview, is great for scientific instrumentation, because it is easy to use and yet very powerful and feature rich. However, the graphical interface sometimes can be a hassle, especially when you want to do complicated mathematical operations. Like a look at the example here for adding up two 1’s. Drawing the wires can be a headache if you are doing many many more operations.

This is when you will need the MathScript in Labview. It is similar to MATLAB syntax and does a good job complimenting the all-graphical programming of Labview.

Today, I received an email saying that NI just released an online beta demo (link). With the demo, you can actually run MathScript programs without installing Labview! It can even output 2D or 3D plots. This is great for plotting function for any school project :)

Try some simple codes:

a= 0 : 0.1 : 2*pi
plot(a, sin(a))

???????????????????????????
sine plot

How to read National Instruments HWS waveform data file in MATLAB

Tuesday, May 22nd, 2007

National Instrument High Speed DIO drivers can read and write a specialized file format HWS (Hierarchical Waveform Storage). It is actually a subset implementation of the famous HDF5, which is best data format for large scientific data (we are talking about terabytes here).

Anyway, as I started playing with .hws file a bit more, I found it quite easy to use, and because it is based on HDF5, I can use any software that supports HDF5 to open the HWS file! And, no surprise here, MATLAB, from ver 6.5, has functions to read and write HDF files.

However, MATLAB’s hdf5read() function requires an unique dataset attribute for the data that you want to load from the HDF5 file. So, to read the NI-HWS file, we need to figure out the dataset attribute. Using HDF Explorer and HDF Viewer application, I was able to find the correct attribute to read the HWS file in MATLAB. Here it is

hdf5read('test.hws','/wfm_group0/axes/axis1/data_vector/data');

The second paramter is the HDF5 attribute for the actual dataset in the HWS file.

UCSD in 1968

Friday, May 4th, 2007

The other day, one of our lab engineers brought an old book over. It is the 1968 Trident! In case you are too young to know the name (just like me), Trident is the Year Book for graduates of UCSD at that time.

1968 is actually a very important year in the history of UCSD. The first undergraduate class of UCSD was admitted in 1964, so 1968 was the first class of UCSD graduates! Anyway, the photo below is the campus photo. At that time, only Revelle College was there. In the 40 years after this photo was taken, UCSD has grown to 6 colleges and more than 20000 students. What an accomplishment!

More history of UCSD on TritonLink?

UCSD in 1968

For comparison, you can take a look at the recent satellite and aerial images. Google Maps, and Microsoft Live Local, or the official UCSD Maps.