MathWorks - Mobile View
  • Sign In to Your MathWorks AccountSe connecter
  • Access your MathWorks Account
    • Mon compte
    • Mon profil
    • Mes licences
    • Se déconnecter
  • Produits
  • Solutions
  • Le monde académique
  • Support
  • Communauté
  • Événements
  • Obtenir MATLAB
MathWorks
  • Produits
  • Solutions
  • Le monde académique
  • Support
  • Communauté
  • Événements
  • Obtenir MATLAB
  • Sign In to Your MathWorks AccountSe connecter
  • Access your MathWorks Account
    • Mon compte
    • Mon profil
    • Mes licences
    • Se déconnecter

Vidéos et webinars

  • MathWorks
  • Vidéos
  • Vidéos
  • Recherche
  • Vidéos
  • Recherche
  • Contacter un commercial
  • Version d'essai
  Register to watch video
  • Description
  • Related Resources

Using Logical Indexing to Plot Points Meeting a Specific Criteria Only

Doug Hull, MathWorks

(Originally posted on Doug's MATLAB Video Tutorials blog.)

If you have a vector of coordinate for a set of points, you might want to differentiate those points. To do that a concept called logical indexing will help you pull out a subset of those points easily.

Here is a quick example.

>> L = logical([0 1 0 1])

L =

     0     1     0     1

>> a = [1 2 3 4]

a =

     1     2     3     4

>> a(L)

ans =

     2     4

Recorded: 16 May 2011

Related Products

  • MATLAB
Related Information
MATLAB Video Blog

Feedback

Featured Product

MATLAB

  • Request Trial
  • Get Pricing

Up Next:

2:51
Selectively Changing an Image in MATLAB with Logical...

Related Videos:

4:29
Absolute and Logical Indexing
2:59
How to Label a Series of Points on a Plot in MATLAB
10:44
Generating Points Inside a Polygon
2:12
Controlling Color Saturation Points on an Image

View more related videos

MathWorks - Domain Selector

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web site

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europe

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

Asia Pacific

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文Chinese
    • English
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Contact your local office

  • Contacter un commercial
  • Version d'essai

Découvrir les produits

  • MATLAB
  • Simulink
  • Version étudiante
  • Support Hardware
  • File Exchange

Essayer ou Acheter

  • Téléchargements
  • Version d'essai
  • Contacter un commercial
  • Tarifs et licences
  • Comment acheter

Se Former

  • Documentation
  • Tutoriels
  • Exemples
  • Vidéos et webinars
  • Formation

Obtenir de l'aide

  • Aide à l'installation
  • Forum MATLAB
  • Services de consulting
  • Gestion Licences
  • Contacter le support technique

La société

  • Offres d'emploi
  • Actualités
  • Social Mission
  • Contacter un commercial
  • La société

MathWorks

Accelerating the pace of engineering and science

MathWorks est le leader mondial des logiciels de calcul mathématique pour les ingénieurs et les scientifiques.

Découvrir…

  • Select a Web Site United States
  • Brevets
  • Marques déposées
  • Charte de confidentialité
  • Lutte anti-piratage
  • État des applications

© 1994-2021 The MathWorks, Inc.

  • Facebook
  • Twitter
  • Instagram
  • YouTube
  • LinkedIn
  • RSS

Rejoignez la conversation

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic.  By continuing to use this website, you consent to our use of cookies.  Please see our Privacy Policy to learn more about cookies and how to change your settings.