This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import cv | |
from opencv import highgui | |
def detect(image): | |
image_size = cv.GetSize(image) | |
# create grayscale version | |
grayscale = cv.CreateImage(image_size, 8, 1) | |
cv.CvtColor(image, grayscale, cv.CV_BGR2GRAY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ME224 Basic Data Acquisition Script | |
% Clear out old handles for devices | |
try | |
stop(ai) | |
delete(ai) | |
catch | |
end | |
% Settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Clear out old handles for devices | |
try | |
stop(ai) | |
delete(ai) | |
catch | |
end | |
% Settings | |
Fs = 100000; % Number of samples to collect per second | |
time_length = 2; % length of time to capture samples (seconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ME224 Basic Data Acquisition Script | |
% Clear out old handles for devices | |
try | |
stop(ai) | |
delete(ai) | |
catch | |
end | |
% Settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Clear out old handles for devices | |
try | |
stop(ai) | |
delete(ai) | |
catch | |
end | |
% Settings | |
Fs = 1221; % Number of samples to collect per second | |
time_length = 60; % length of time to capture samples (seconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~> cat test.c | |
int main() | |
{ | |
int i = 0; | |
int j = 0; | |
for( i = 0; i < 100; i++ ) | |
j += i; | |
return 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ME224 Basic Data Output Script | |
try | |
stop(ai); delete(ai); | |
catch | |
end | |
% Settings | |
Fsi = 1000; % input sample rate | |
time_length = 1; % length of time to capture samples (seconds) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calc_tankfield | |
global EROOT; | |
if ~exist('EROOT') | |
EROOT = alabstartup('snyd07a'); | |
end | |
% Enable/Disable Features | |
tank = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (c) 2009 CodeSourcery, Inc. | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above copyright | |
* notice, this list of conditions and the following disclaimer in the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function status= call_gmsh(geo_file,dim) | |
% call_gmsh: call Gmsh to create a vol_file from a geo_file | |
% status= call_netgen(geo_file, vol_file, msz_file, finelevel) | |
% staus = 0 -> success , negative -> failure | |
% | |
% geo_file = geometry file (input) | |
% vol_file = FEM mesh file (output) | |
% msz_file = Meshsize file in netgen format | |
% | |
% Finelevel controls the fineness of the mesh |