Hi
I have loaded a text file into a matrix using dlmread function. this has 17 columns.. and now i want to add another column that is the multyplication of the 17th column and the 15th column. how do I do so?
thank you!!

 채택된 답변

Walter Roberson
Walter Roberson 2019년 1월 30일

1 개 추천

YourArray(:,end+1) = YourData(:,15) .* YourData(:,17);

댓글 수: 2

itzhak mal
itzhak mal 2019년 1월 30일
When I used dlm read it went into a matrix you named here "YourArray" right? So what's the difference between the "YourData" and the matrix? How do I solve this?
Thank you so much!!
TheNameOfYourArrayGoesRightHere(:,end+1) = TheNameOfYourArrayGoesRightHere(:,15) .* TheNameOfYourArrayGoesRightHere(:,17);

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

추가 답변 (0개)

카테고리

질문:

2019년 1월 30일

댓글:

2019년 1월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by