필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

how to check the values of each variables from resultant of 3 variables?

조회 수: 1 (최근 30일)
summyia qamar
summyia qamar 2017년 1월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
I have sum of 3 cell arrays
A=72x1
B=72x720
C=72x90
resultant=72x64800
now when I find the minimum value with row and column indices I can locate the row element easily but how can I locate the column element in variables? for example after dong calculations for A,B,C I added them all and got a resultant in from of 72x(720x90) or can say a matrix of integers of size 72x64800 then I found the minimum value of resultant with row and column index using the code below.
[minimumValue,ind]=min(resultant(:));
[row,col]=find(result== minimumValue);
then row got 14 and column got 6840 value.. now I can trace row 14 of all A,B,C variables easily but how can I know that the resultant column 6480 belongs to which combination of A,B,C?

답변 (1개)

Image Analyst
Image Analyst 2017년 1월 29일
Which of the 4 variables are you referring to when you say "how can I check column in variables?" They all have 72 rows but different numbers of columns: 1, 720, 90, and 64800 for A, B, C, and resultant respectively.
You say "the column is (720x90)" <=== that is incorrect. A column is a vertical list of numbers, just one column wide. Something 720 by 90 is a "matrix" or 2-D array, NOT a column.
Only for "resultant" can you access the 6480th column, not for variables A, B, and C. You just pass the number into the column (second) index
theValue = resultant(someRow, 6480);
  댓글 수: 1
summyia qamar
summyia qamar 2017년 1월 30일
actually after dong calculations for A,B,C I added them all and got a resultant in from of 72x(720x90) or can say a matrix of integers of size 72x64800 then I found the minimum value of resultant with row and column index using the code below.
[minimumValue,ind]=min(resultant(:));
[row,col]=find(result== minimumValue);
then row got 14 and column got 6840 value.. now I can trace row 14 of all A,B,C varables easily but how can I know that the resultant column 6480 belongs to which combination of A,B,C?

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by