You need to have a Total Phase Aardvark host adaptor installed to use the spi interface. You must install the "Aardvark Software API and Share Library" appropriate for your operating system. See SPI Interface Usage Requirements and Guidelines for more information.
The aardvark.dll file that comes with the Total Phase Aardvark adaptor board must be available in one of these locations for use on Windows® platforms:
The location where MATLAB® was started from (bin folder)
The MATLAB current folder (PWD)
The Windows folder C:\winnt or C:\windows
The folders listed in the PATH environment variable
Ensure the Aardvark adaptor is installed properly.
Look at the adaptor properties.
You can create a SPI object using the spi function. The example in the next section uses a SPI object called S that communicates to an EEPROM chip. Create the object using the BoardIndex and Port numbers, which are 0 in both cases.
S = spi('aardvark', 0, 0);
You can then display the object properties.
You can see that the communication settings properties reflect what was used to create the object – BoardIndex of 0 and Port of 0. For information about other properties, see Using Properties on the SPI Object.