Matlab Class

Thursday, May 14, 2015

Conversion of general matrix to logical array using MatLab

If the element is non zero then it will be manipulated as logical one. else it is taken as zero.


Example Program:


%% Generate a Matrix

A=[3 5 6; 4.5 0 6;0 0 1.3]

%% Convert the matrix into the logical array

B=logical (A)
Posted by Advaitha at 9:59 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Advaitha
View my complete profile

Blog Archive

  • ▼  2015 (15)
    • ►  June (1)
    • ▼  May (14)
      • Matlab code to solve differential equation D2y-2*D...
      • Matlab code to solve the 2nd order differential eq...
      • MatLab code to Solve the 1st order differential eq...
      • MatLab code to Solve the 1st order differential eq...
      • Matlab code to Solve the 2nd order differential eq...
      • MatLab code to solve 1st order differential equat...
      • Hermitian of a complex matrix using MatLab
      • Conversion of general matrix to logical array usin...
      • Check the class of the variables in MatLab
      • Data Type check of stored variables in Matlab work...
      • Toeplitz matrix generation using Matlab
      • Generating Vandermonde Matrix in MatLab
      • Logical Array in Matlab
      • Swap Rows and Columns of the matrix using Matlab
Simple theme. Powered by Blogger.