Use specific value in a dataset array

I have imported a file from excel. I am now trying to do few calculations based on each value in the spreadsheet. For example, if x and y are two columns in the dataset, I want Matlab to choose the corresponding values of the other column. i.e if x=a, then choose corresponding y=P from the dataset as specified in the imported excel spreadsheet and perform calculations for z=1-y and I want it to do it for every value of x. Is there a specific way to do this? Thanks.

댓글 수: 3

José-Luis
José-Luis 2016년 9월 19일
Yes, there is.
Looks like you need to read about indexing, more particularly logical indexing.
It is easier to get help if you show some effort beforehand.
AHN
AHN 2016년 9월 20일
Thank you for the reply. I am new to Matlab, I will read about logical indexing and get back.Thanks.
José-Luis
José-Luis 2016년 9월 20일
No worries and welcome to Matlab.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

태그

질문:

AHN
2016년 9월 19일

댓글:

2016년 9월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by