Skip to content

Instantly share code, notes, and snippets.

%Simple analog diaplay
figure(2); clf;
clear all
%trash any existing analog i/o objects
delete(daqfind);
%define the input
adaptor = 'nidaq';
adaptorData = daqhwinfo(adaptor);
%get the adaptor id,
%Simple analog output
%define the output
adaptor = 'winsound';
id = 0;
chan = 1;
% Analog output object Configuration.
% Create an analog input object with one channel.
ao = analogoutput(adaptor, id);
%record and play back as fast as possible
%with digital filtering
clear all;
clf;
delete(daqfind);
%sample rate and number of inputs per tirgger
numinput = 2000;
samrate = 8000;

Analog Output

Çıkış verisi için DAQ kartlarının çoklu analog kanalları vardır.

Library (Kütüphane)

Data Acquisition Toolbox

Not: 64 bit analog Windows sistemlerde legacy interface (miras arayüzü) kullanmayınız. Veri toplama ve veri oluşturmada session-based interface (oturum tabanlı arayüz) kullanınız.

@zaman
zaman / priority_queue.py
Created November 23, 2011 03:39
oncelikli kuyruk
#!/usr/bin/python
#-*-coding:utf-8-*-
class oncelikli_kuyruk:
def __init__(self):
self.items = []
def peek(self):
return self.items[0]
function x = jacobi ( A, b, xold, TOL, Nmax )
%JACOBI approximate the solution of the linear system Ax = b by applying
% the Jacobi method (simultaneous relaxation)
%
% calling sequences:
% x = jacobi ( A, b, xold, TOL, Nmax )
% jacobi ( A, b, xold, TOL, Nmax )
%
% inputs:
function [x,iter] = gaussseidel(A,b,tol,max)
% Usage: [x,iter] = gaussseidel(A,b,tol,max)
% Uses Jacobi iteration to solve Ax = b
% Input variables:
% A = matrix
% b = rhs
% tol = l2 tolerance on residue
% max = maximum allowable number of iterations
% Output variables:
% x = solution
function [x,iter] = gaussseidel(A,b,tol,max)
% Usage: [x,iter] = gaussseidel(A,b,tol,max)
% Uses Jacobi iteration to solve Ax = b
% Input variables:
% A = matrix
% b = rhs
% tol = l2 tolerance on residue
% max = maximum allowable number of iterations
% Output variables:
% x = solution
function [x,it,err] = newton1(x0,tol,fname,fpname)
% Newton's metod
% alt a) |f(x^k)| <= tol
it = 0;
x = x0;
fx = feval(fname , x);
fpx = feval(fpname, x);
err = abs(fx);
@zaman
zaman / gist:2508990
Created April 27, 2012 12:58
definicion de proyecto
queramos crear un infrastructure de telecommunicaciones entre tres edificio. Hemos examinado Real Decreto 346/2011. Porque tenemos que cumplir sus normas. hemos localizado RITI, RITS y la antena en el medio edificio. Entonces hemos diseñado como nos se puede distribuir a otro edificio. Tubo de telefono e internet conectarse a RITI. y RITS recibir la señal de RTV. Tenemos que conectar RITI y RITS mutuamente. Un tubo conectarse a Edificio Lateral Izquierdo y un tubo conectarse a Edificio Lateral Derecho traves de RITS. Entonces hemos dibujado planes para cada plantas y localizado todos elementos. Hemos examinado los datos tecnicos por cada componente. Hemos buscado costo de cada componente y calculamos presupuesto total.