필터 지우기
필터 지우기

How to multiply the column in matlab..?

조회 수: 55 (최근 30일)
nani kalyan
nani kalyan 2015년 5월 21일
답변: dpb 2015년 5월 21일
Here i have attached the Excel file, in this i should calculate the column 2 and column 3 has to be multiply.so, for that i need some commands, please help me friends.
  댓글 수: 2
Star Strider
Star Strider 2015년 5월 21일
You have to describe what you want to do in more detail.
What specifically do you want to do with Column 2 and Column 3?
nani kalyan
nani kalyan 2015년 5월 21일
i want to multiply the both columns.

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

채택된 답변

dpb
dpb 2015년 5월 21일
Just use the : operator in the row position to collect all rows and a specific column number in the column position. NB: also that * is matrix multiplication so if you want the element-wise multiplication as would presume from the question you do, you have to use the "dot" operator .*
p=x(:,2).*x(:,3);
assuming the array read from Excel is in variable x
See the help page on Arithmetic Operators under the Language Fundamentals section in *Getting Started" section or
doc times % for direct link from command line for details

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by