cellFill - % the input vector, all in that order. %...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% 9/16/2009 2:46 PM % Function Name: cellFill % Inputs: 1. bin (double) - a vector containing only 0's and 1's % Outputs: 1. cell (cell) - a cell array containing the original string in % 4 different formats % % Function Description: % The function takes in a row vector containing 0s and 1s. The function % should create a cell array containing the input vector as a string of % 1s and 0s, a vector of 0s and 1s, a logical vector where 0 is true and % 1 is false, and a cell array containing two items, the mean and the sum of
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % the input vector, all in that order. % function cell = cellFill(bin) cell = {char(bin + 48), bin, ~logical(bin), {mean(bin), sum(bin)}}; % 1. char vector of 0s and 1s as chars % 2. vector of 0s and 1s, same as input vector % 3. vector of 0s and 1s as logicals but switched using the "not" operator % 4. cell array of 1) mean of input char and 2) sum of input char %...
View Full Document

This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Institute of Technology.

Ask a homework question - tutors are online