필터 지우기
필터 지우기

sending array as grouping variable in gscatter

조회 수: 1 (최근 30일)
Muazma Ali
Muazma Ali 2021년 12월 5일
답변: Cris LaPierre 2021년 12월 24일
Hi! :)
I am wondering whether I can send an array as my second grouping variable whilst making gscatter plots;
like whether the code below is right:
gscatter(total_activity_20_celcius, total_activity_40_celcius, combination_salt, weight_percent_salts) where weight_percent_salts is an array consisting of two numbers like [20 50].

답변 (1개)

Cris LaPierre
Cris LaPierre 2021년 12월 24일
Your grouping variable can be any of the following:
categorical vector | logical vector | numeric vector | character array | string array | cell array of character vectors | cell array
It can therefore be a vector the same length as total_activity_20_celcius and total_activity_40_celcius. If you want to have two grouping variables, they must be enclosed in square brackets.
gscatter(total_activity_20_celcius, total_activity_40_celcius, [combination_salt, weight_percent_salts])
See here.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by