Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What is the logical function in Matlab?

Status
Not open for further replies.

deepu_s_s

Full Member level 5
Full Member level 5
Joined
Mar 24, 2007
Messages
305
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,298
Activity points
3,021
Hi friends,

Can anybody clear my doubt ....

What is islogical function in matlab.. Please explain me in detail...

Is float is the default data type in Matlab?


Thanks and Regards
Deeapk
 

Re: Doubt in Matlab

islogical - function
write down on matlab command prompt

helpwin islogical

you will get detail explanation
 

Doubt in Matlab

Many MATLAB functions and operators default to double (double-precision floating point), but some functions and operators work with other object types too. For example, if you type 2+2, the answer 4 will be double. If you type x=int8(2) and then x+x, the answer 4 will be int8.

If you wish to identify the type of an object, try the 'class' function. For example, class(pi) returns the string 'double'.
 

Re: Doubt in Matlab

from Matlab help:
"ISLOGICAL(X) returns true if X is a logical array and false otherwise.
Logical arrays must be used to perform logical 0-1 indexing."
eg.
>> x=[0 1 0 1 0 0 1]

x =

0 1 0 1 0 0 1

>> y=logical(x)

y =

0 1 0 1 0 0 1

>> z=islogical(y)

z =

1
in workspace, y and z are both logical class,...
For the second question "Yes", float is the default...
 

Doubt in Matlab

it means that the array will contain only binary 1s and 0s.

So the array which contains that kind of elements is known as logical array. Is that right?

What is logical class
 

Doubt in Matlab

Open your MATLAB help navigator, and search for "logical types".
It explains that data type, and gives various examples.
 

Doubt in Matlab

best way to learn the matlab is the matlab help file and the matlab official site www.mathworks.com
 

Re: Doubt in Matlab

HAI zio_nneo,
YES what he said is correct and easy method for learning matlab
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top