The MATLAB coding style, project options and synthesis directives can have a significant effect on the final results. Knowledge about how a particular algorithm should be implemented in hardware can be reflected in the MATLAB code to improve the results. In doing so, the MATLAB loses a bit of its abstraction but the lower-level MATLAB will infer the desired architecture into the device.
通用串行總線USB(Universal Serial Bus)是一種新型的微機總線接口規范。隨著客戶對系統數據采集速度要求的不斷提高,USB以其使用方便、易于擴展、速度快等優點而越來越多的應用于數據采集系統中。本文介紹了一種基于USB總線的數據采集系統的設計方法,采用PHILIPS公司的USB接口芯片PDIUSBD12與單片機AT89C51進行通信,并和PC機通信而編制出友善的設備應用程序。該系統用傳統的USB總線取代了RS232串行總線,通過對USB協議和設備構架的充分理解,對以單片機89C51和USB接口芯片PDIUSBD12為主的數據采集系統進行了硬件設計和軟件編程,并在此設計的基礎上給出相應的原理圖。硬件設計主要解決的是PDIUSBD12和ADC0809與單片機之
Distribution generator
Here is a simple generator which can build some distributions with given properties.
Distributions generator (compile with -lm)
Typical use might be:
./distributions -u -m 1 -M 10 -n 100 -s 500
Generates a distribution of 100 uniform random numbers between 1 and 10, such that the sum of numbers is 500.
./distributions -p -2.2 -m 1 -M 100 -n 200 -s 500
Idem with 200 numbers between 1 and 100 following a power law with exponent -