Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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