필터 지우기
필터 지우기

replacing the value

조회 수: 2 (최근 30일)
kash
kash 2012년 3월 20일
I have a dataset
gene samples
1 .6 .1 .8
2 .2 .98 .96
10 0.45 .4 .87
like these i have 50 rows and 62 columns
there are three conditions
A=(<=.4)
B=>.4 to .87
C=>.87
from these conditions i want to get output as
A=1,2,10(genes)
B=1,10(genes)
C=2(genes)
please help how to process

채택된 답변

Grzegorz Knor
Grzegorz Knor 2012년 3월 20일
samples = [
.6 .1 .8
.2 .98 .96
.45 .4 .87 ];
genes = [1;2;10];
%A=(<=.4)
A = genes(any(samples<=.4,2))
%B=>.4 to .87
B = genes(any(samples>=.4 & samples<.87 ,2))
%C=>.87
C = genes(any(samples>=.87,2))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Genomics and Next Generation Sequencing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by