my_compare - end e for i=1:min(length(char1),...

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

View Full Document Right Arrow Icon
function out = my_compare(char1,char2) f a=lower(char1); b=lower(char2); c=double(char1); d=double(char2); d if length(char1)<length(char2) out={a,b}; else out={b,a};
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end e for i=1:min(length(char1), length(char2)) if c(i)==d(i) elseif c(i)<d(i) out={a,b}; break else c(i)>d(i) out={b,a}; break end end...
View Full Document

This note was uploaded on 02/18/2010 for the course ENGINEERIN 7 taught by Professor Patzek during the Spring '08 term at Berkeley.

Ask a homework question - tutors are online