array2bintree - for i = 1:length(array add this element of...

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

View Full Document Right Arrow Icon
function [tree] = array2bintree(array) % % takes an array of scalars an returns the array in binary tree form % initialize binary treee tree = []; % loop through array
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for i = 1:length(array) % add this element of array to tree tree = add2tree(tree, array(i)); end % end for i end % end array2bintree.m...
View Full Document

This note was uploaded on 11/16/2009 for the course ENGIN 7 taught by Professor Horowitz during the Spring '08 term at Berkeley.

Ask a homework question - tutors are online