-------------------> Session (re)starting: 05-Mar-2008 09:27:35 uiopen('/nfs/mneme/home/users/bramley/today/ev.m',1) ls ev.m fact.m gauss.m lsi.html normal.m o ppp.m results.m rrr.m dir . fact.m o .. gauss.m ppp.m .nfs01db41230000000a lsi.html results.m ev.m normal.m rrr.m ls o cachesize_rama.m fact.m lsi.odp mat5936.m planet2.m rrr.m ev.m gauss.m manpage_example normal.m ppp.m ex3.html lsi.html manpage_example.tar oldmanpage_ex.tar results.m ls /etc DIR_COLORS fstab modprobe.conf reader.conf.d DIR_COLORS.xterm gatherd.conf modprobe.conf~ redhat-lsb Muttrc gconf modprobe.d redhat-release Muttrc.local gdm motd reposd.conf NetworkManager ghostscript motd.global request-key.conf Pegasus gimp mozpluggerrc resolv.conf X11 gnome-vfs-2.0 mplayer resolv.conf.diddle a2ps-site.cfg gnome-vfs-mime-magic mrtg rhgb a2ps-site.cfg.rpmnew gpm-root.conf mtab rmt a2ps.cfg gre.d mtools.conf rndc.key acpi group multipath.conf rpc adjtime group- my.cnf rpm aide.conf group.FCS nail.rc rwtab ais group.RHEL named.caching-nameserver.conf rwtab.d alchemist group.solaris named.rfc1912.zones samba aliases grub.conf netgroup sane.d aliases.db gshadow netlabel.rules sasl2 alsa gshadow- netplug scim alternatives gssapi_mech.conf netplug.d screenrc amanda gtk news scrollkeeper.conf amandates gtk-2.0 nmh scsi_id.config amd.conf gxine nscd.conf securetty amd.conf.rpmnew hal nsswitch.conf security amd.net host.conf ntp selinux amd.net.rpmnew hosts ntp.conf sensors.conf anacrontab hosts.allow ntp.conf.diddle services ant.conf hosts.deny odbc.ini sestatus.conf ant.d hp odbcinst.ini setroubleshoot anthy-conf htdig oddjob setuptool.d apt httpd oddjobd.conf sgml asound.state ibm_hosts oddjobd.conf.d shadow at.deny icalicense ofed shadow- atop ident.key openalrc shadow.FCS audit idmapd.conf openhpi shadow.RHEL auto.master imapd.conf openldap shadow.solaris auto.master.rpmnew init.d openmpi-default-hostfile shells auto.misc initlog.conf openmpi-mca-params.conf skel auto.net inittab openmpi-totalview.tcl slrn.rc auto.nfs inputrc opera6rc smart auto.smb iproute2 opera6rc.fixed smartd.conf autofs_ldap_auth.conf isdn opt smi.conf avahi issue pam.d smrsh bash_completion.d issue.net pam_pkcs11 snmp bashrc java pam_smb.conf sound blkid joe pango squid bluetooth jvm papersize squirrelmail bonobo-activation jvm-commmon papersize.rpmnew srp_daemon.conf brltty jwhois.conf passwd ssh brltty.conf kde passwd- ssl cachefilesd.conf kderc passwd.FCS stunnel capi.conf kdump.conf passwd.RHEL subversion cdrecord.conf krb.conf passwd.solaris sudoers clamd.conf krb5.conf pcmcia sysconfig cluster krb5.conf.rpmnew pear.conf sysctl.conf conman.conf ksysguarddrc php.d syslog.conf cron.d lam php.ini syslog.conf.diddle cron.daily ld.so.cache pine.conf termcap cron.deny ld.so.conf pinforc tomcat5 cron.hourly ld.so.conf.d pki tux.mime.types cron.monthly ldap.conf pm udev cron.weekly ldap.conf.rpmnew postfix updatedb.conf crontab ldap.secret ppp uucp crontab.local lftp.conf prelink.cache vga crontab.local.diddle libaudit.conf prelink.conf vimrc csh.cshrc libpaper.d printcap virc csh.login libuser.conf profile vsftpd cups lisarc profile.d w3m cyrus.conf localtime protocols warnquota.conf dbus-1 log.d pump.conf webalizer.conf default login.defs purple wgetrc depmod.d logrotate.conf quagga wpa_supplicant desktop-profiles logrotate.conf.rpmnew quotagrpadmins wvdial.conf dev.d logrotate.d quotatab xdg dhcpd.conf logwatch racoon xferstats.cfg dkms lsb-release.d raddb xinetd.conf dovecot.conf ltrace.conf radvd.conf xinetd.d dumpdates lvm rarfiles.lst xml enscript.cfg lynx-site.cfg rc xpdfrc enscriptsite.cfg lynx.cfg rc.d yp.conf environment mail rc.local ypserv.conf esd.conf mail.rc rc.news yum ethers mailcap rc.sysinit yum.conf exim mailman rc0.d yum.repos.d exports makedev.d rc1.d zlogin fb.modes man.config rc2.d zlogout filesystems maven rc3.d zprofile firmware mc rc4.d zshenv fonts mgetty+sendfax rc5.d zshrc foomatic mime.types rc6.d freshclam.conf minicom.users readahead.d freshclam.conf.rpmnew mke2fs.conf reader.conf dir o . fact.m manpage_example.tar ppp.m .. gauss.m mat5936.m results.m cachesize_rama.m lsi.html normal.m rrr.m ev.m lsi.odp oldmanpage_ex.tar ex3.html manpage_example planet2.m dir('o') . fact.m manpage_example.tar ppp.m .. gauss.m mat5936.m results.m cachesize_rama.m lsi.html normal.m rrr.m ev.m lsi.odp oldmanpage_ex.tar ex3.html manpage_example planet2.m ls whev.m fact.m gauss.m lsi.html normal.m o ppp.m results.m rrr.m which rrr /nfs/mneme/home/users/bramley/today/rrr.m clc help ls LS List directory. LS displays the results of the 'ls' command on UNIX. On UNIX, LS returns a character row vector of filenames separated by tab and space characters. On Windows, LS returns an m-by-n character array of filenames, where m is the number of filenames and n is the number of characters in the longest filename found. Filenames shorter than n characters are padded with space characters. You can pass any flags to LS as well that your operating system supports. See also dir, mkdir, rmdir, fileattrib, copyfile, movefile, delete. Reference page in Help browser doc ls lsresults = ls lsresults = ev.m fact.m gauss.m lsi.html normal.m o ppp.m results.m rrr.m whos Name Size Bytes Class Attributes lsresults 1x69 138 char dirres = dir dirres = 12x1 struct array with fields: name date bytes isdir datenum dir . fact.m o .. gauss.m ppp.m .nfs01db41230000000a lsi.html results.m ev.m normal.m rrr.m dirres dirres = 12x1 struct array with fields: name date bytes isdir datenum ccc achar = 'a' achar = a anum = double(a) ??? Undefined function or variable 'a'. anum = double(achar) anum = 97 % Inverse direction: char c = char(97) c = a whos Name Size Bytes Class Attributes achar 1x1 2 char anum 1x1 8 double c 1x1 2 char 2^16 ans = 65536 char(0:255) ans =   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ size(ans) ans = 1 256 char(0:2255) ans =   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ char(-9) Warning: Out of range or non-integer values truncated during conversion to character. ans = size(ans) ans = 1 1 ccc names = strvcat('Sam', 'Ramanujam', 'Fred', 'William Harvey') names = Sam Ramanujam Fred William Harvey whos Name Size Bytes Class Attributes names 4x14 112 char names2 = char('Sam', 'Ramanujam', 'Fred', 'William Harvey') names2 = Sam Ramanujam Fred William Harvey whos Name Size Bytes Class Attributes names 4x14 112 char names2 4x14 112 char names2 = char('Sam', 'Ramanujam', 'Fred', '', 'William Harvey') names2 = Sam Ramanujam Fred William Harvey names = strvcat('Sam', 'Ramanujam', 'Fred', '', 'William Harvey') names = Sam Ramanujam Fred William Harvey catsname = names(4,:) catsname = William Harvey catsname(3:9) ans = lliam H namelength = lenght(catsname) ??? Undefined function or method 'lenght' for input arguments of type 'char'. namelength = length(catsname) namelength = 14 catsname(14:-1:1) ans = yevraH mailliW catsname(end:-1:1) ans = yevraH mailliW bf = [ans catsname] bf = yevraH mailliWWilliam Harvey bf = [ans; catsname] bf = yevraH mailliW William Harvey names2 names2 = Sam Ramanujam Fred William Harvey g = 'Don''t do that' g = Don't do that g = 'Don''''t do that' g = Don''t do that g = 'Don"t do that' g = Don"t do that deblank(g) ans = Don"t do that whos Name Size Bytes Class Attributes ans 1x13 26 char bf 2x14 56 char catsname 1x14 28 char g 1x13 26 char namelength 1x1 8 double names 4x14 112 char names2 5x14 140 char names names = Sam Ramanujam Fred William Harvey sam = names(1,:) sam = Sam whos Name Size Bytes Class Attributes ans 1x13 26 char bf 2x14 56 char catsname 1x14 28 char g 1x13 26 char namelength 1x1 8 double names 4x14 112 char names2 5x14 140 char sam 1x14 28 char deblank(sam) ans = Sam size(ans) ans = 1 3 ls ev.m fact.m gauss.m greet lsi.html normal.m o ppp.m results.m rrr.m lsstring = ls lsstring = ev.m fact.m gauss.m greet lsi.html normal.m o ppp.m results.m rrr.m whos Name Size Bytes Class Attributes ans 1x2 16 double bf 2x14 56 char catsname 1x14 28 char g 1x13 26 char lsstring 1x76 152 char namelength 1x1 8 double names 4x14 112 char names2 5x14 140 char sam 1x14 28 char I = find(lsstring == ' ') I = 5 6 13 14 22 23 29 30 48 49 51 52 58 59 69 70 exit -------------------> Session (re)starting: 05-Mar-2008 10:16:45 intfuns = char('ceil', 'floor', 'fix', 'round') intfuns = ceil floor fix round whos Name Size Bytes Class Attributes intfuns 4x5 40 char k = 2 k = 2 s = [deblank(intfuns(k,:)) '(pi)'] s = floor(pi) whos Name Size Bytes Class Attributes intfuns 4x5 40 char k 1x1 8 double s 1x9 18 char floor(pi) ans = 3 s s = floor(pi) eval(s) ans = 3 k = 2 k = 2 s = [deblank(intfuns(k,:)) '(pi)'] s = floor(pi) k = 3 k = 3 s = [deblank(intfuns(k,:)) '(pi)'] s = fix(pi) eval(s) ans = 3 k = 1 k = 1 s = [deblank(intfuns(k,:)) '(pi)'] s = ceil(pi) eval(s) ans = 4 evalc(s) ans = ans = 4 size(ans) ans = 1 13 whos Name Size Bytes Class Attributes ans 1x2 16 double intfuns 4x5 40 char k 1x1 8 double s 1x8 16 char ans ans = 1 13 help findstr FINDSTR Find one string within another. K = FINDSTR(S1,S2) returns the starting indices of any occurrences of the shorter of the two strings in the longer. FINDSTR is symmetric in its two arguments; that is, either S1 or S2 may be the shorter pattern to be searched for in the longer string. If you do not want this behavior, use STRFIND instead. Examples s = 'How much wood would a woodchuck chuck?'; findstr(s,'a') returns 21 findstr('a',s) returns 21 findstr(s,'wood') returns [10 23] findstr(s,'Wood') returns [] findstr(s,' ') returns [4 9 14 20 22 32] See also strfind, strcmp, strncmp, strmatch, regexp. Overloaded functions or methods (ones with the same name in other directories) help opaque/findstr.m Reference page in Help browser doc findstr exit