How to create a threshold on a plot?

5 ビュー (過去 30 日間)
Megan Osterhaus
Megan Osterhaus 2020 年 10 月 1 日
回答済み: KALYAN ACHARJYA 2020 年 10 月 1 日
How do you create a binary array that tells you whether a (2D) plot is "yes" or "no" above a threshold of 0.5?

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 10 月 1 日
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

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by