0% found this document useful (0 votes)
59 views6 pages

Commands For Managing A Sessions: Helpwin

The document provides information about various commands in MATLAB for managing sessions, workspace, directories, and files. Some key commands include help, which lists available help topics, clear to clear variables from the workspace, pwd to show the current working directory, and save to save workspace variables to a file. Arithmetic, logical, and relational operators are also summarized, along with special characters and predefined variables in MATLAB.

Uploaded by

Kartikey Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views6 pages

Commands For Managing A Sessions: Helpwin

The document provides information about various commands in MATLAB for managing sessions, workspace, directories, and files. Some key commands include help, which lists available help topics, clear to clear variables from the workspace, pwd to show the current working directory, and save to save workspace variables to a file. Arithmetic, logical, and relational operators are also summarized, along with special characters and predefined variables in MATLAB.

Uploaded by

Kartikey Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Help related commands

Commands for Managing a Sessions

help

Lists topics on which help is available

helpwin

Opens the interactive help window, opens MATLAB file


help: default topics

helpdesk

Opens the web browser-based help facility, open MATLAB


based basic information like whats new ,documentation

help topic

Provides help on topic

lookfor keyword

Lists help topics containing that keyword, Searches help


entries for a keyword.

demo

Runs the demo program, vedio etc

exist

Checks for existence of file or variable.give result in zeo

Workspace information

and one only

who

Lists current variables.

whos

lists variables currently in the workspace with their


size,byte,class,attribute

clear
clear

Clears Command window.

x y z

Clears only x,y,z

clc

clears command window, cursor moves to the top

clf

Clear figure window

home

scrolls the command window to put the curser on top

mlock/ munlock fun

Locks/unlocks function fun so that clear cannot/can


remove it

What

Lists all MATLAB files in current directory

clear all

clears all variables and functions from workspace

1|BASICS OF MATLAB

Directory information

pwd

shows the current working directory,tell the name of


directory

cd

changes the current working directory cd(cre lab)

dir/ls

lists contents of the current directory

path

gets or sets MATLAB search path

editpath

Modifies matlab search path

copyfile

Copies a file

mkdir

Make a directory

Termination ctrl+c

General Information (system & file command)

quit/exit

Local abort,kils current command execution


Exit matlab

computer

Show the OS on which you r working like PCWIN64

clock

Give clock time in form of array


[year month day hour minute seconds]

date

Current date as date string in dd-mmm-yyyy format.

more

controls the paged output according to the screen size

ver

gives the license and the MATLAB version information

bench

benchmarks your computer on running MATLAB


compared to other computers on basis of six different
task

cputime

It returns the CPU time in seconds that has been used


by the MATLAB process since MATLAB started.

pause (sec)

Pause the system for that much seconds

save(filename)

Saves workspace variables in a file name filename , by


default in matlab.mat

type file

Display content of file like type diary return

'diary' is a built-in function.

delete file

2|BASICS OF MATLAB

Delete file from workspace

Others

load (filename)

Loads workspace variables from file name filename

wk1read/wk1write
Read and write variable,not available in future versions
(filename,variable)
diary
Switches on/off diary file recording.
diary on/off

Open/close the diary for recording

diary(filename)

Create a diary of file name filename

dos command

Execute the command in dos

3|BASICS OF MATLAB

Arithmetic Operator

Basic Operators & Special Characters

Command / help

Sign

Uses

plus

uplus

Unary plus ,same as plus ,very rarely use

minus

Minus

uminus

Unary minus ,very rarely use

mtimes

Matrix multiply

times

.*

Array multiply

mpower

Matrix power

power

.^

Array power

mldivide

Backslash or left matrix divide

mrdivide

Slash or right matrix divide

ldivide

.\

Left array divide

rdivide

./

Right array divide

idivide

NA

Integer division with rounding option. Used in format

Plus

idivide(A, B, opt)

kron

NA

Kronecker tensor product (all possible product) ()

Relational Operator

,Format is kron (a,b)

Commands / help

Sign

Uses

eq

==

Equal

ne

~=

Not equal

lt

<

Less than

gt

>

Greater than

le

<=

Less than or equal

ge

>=

Greater than or equal

4|BASICS OF MATLAB

Commands / help

Sign

Uses

relop

&&

Short-circuit logical AND, format is a&&b ,short circuit

Logical operators

means if a is wrong it will not evaluate b

relop

||

Short-circuit logical OR

and

&

Element-wise logical AND

or

Element-wise logical OR

not

Logical NOT

xor

(Logical EXCLUSIVE OR) XOR(S,T) The result is 1 where

either S or T, but not both, is nonzero. The result is 0 where

Special characters

S and T are both zero or nonzero. dimensionally agree

any

True if any element of vector is nonzero

all

True if all elements of vector are nonzero

Commands / help

Sign

Uses

colon

Colon

paren

( )

Parentheses and subscripting

paren

[ ]

Brackets

paren

{ }

Braces and subscripting

punct

Function handle creation

punct

Decimal point

punct

Structure field access

punct

..

Parent directory

punct

...

Continuation

punct

Separator

punct

Semicolon

punct

Comment

punct

Invoke operating system command

punct

Assignment

punct

'

Quote

transpose

.'

Transpose

ctranspose

'

Complex conjugate transpose

horzcat

[,]

Horizontal concatenation

5|BASICS OF MATLAB

vertcat

[;]

Vertical concatenation

subsasgn

(),{},.

Subscripted assignment

subsref

(),{},.

Subscripted reference

subsindex
metaclass

Subscript index

metaclass(object) returns the meta.class object for the

Predefined variables
& constants

class of object.

ans

Most recent answer, overwrites everytime if not define in


a vaiable

eps

Spacing of floating point numbers or Accuracy of floatingpoint precision.

i,j

The imaginary unit,

Inf

infinity

NaN

Not a number

pi

22/7

6|BASICS OF MATLAB

You might also like