How to create a threshold on a plot?

8 visualizzazioni (ultimi 30 giorni)
Megan Osterhaus
Megan Osterhaus il 1 Ott 2020
Risposto: KALYAN ACHARJYA il 1 Ott 2020
How do you create a binary array that tells you whether a (2D) plot is "yes" or "no" above a threshold of 0.5?

Risposte (1)

KALYAN ACHARJYA
KALYAN ACHARJYA il 1 Ott 2020
Example:
data_2d=rand(1,20); %Example
threshold_val=0.5;
binary_array=data_2d>threshold_val % This create a binary array based on threshold_val

Categorie

Scopri di più su Visual Exploration in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by