What Does A([i j], = J*A([i j], ; Mean in MatLab?

  • Context: MATLAB 
  • Thread starter Thread starter RyMi
  • Start date Start date
  • Tags Tags
    Matlab Mean
Click For Summary
SUMMARY

The expression A([i j], :) = J*A([i j], :) in MATLAB assigns the result of matrix multiplication between J and a subset of matrix A to the specified rows of A. Here, A([i j], :) selects all columns of rows i and j of matrix A, while J*A([i j], :) performs matrix multiplication, where J is another matrix. This operation is crucial for translating MATLAB algorithms into Java, particularly when working with matrix operations.

PREREQUISITES
  • Understanding of MATLAB matrix indexing
  • Familiarity with matrix multiplication concepts
  • Basic knowledge of Java programming and matrix operations
  • Experience with translating algorithms between programming languages
NEXT STEPS
  • Research MATLAB matrix indexing techniques
  • Learn about matrix multiplication in Java using libraries like Apache Commons Math
  • Explore the differences between MATLAB and Java in handling matrices
  • Study algorithm translation best practices between MATLAB and Java
USEFUL FOR

Java developers, algorithm translators, and anyone working with matrix operations in MATLAB and Java.

RyMi
Messages
7
Reaction score
0
What Does A([i j],:) = J*A([i j],:); Mean in MatLab?

Title pretty much describes it all. I have no familiarity with MatLab and I'm translating an algorithm into Java. A and J are matrices and i and j are integers. I already have a Matrix class in Java that can handle most matrix operations, I just need to know what this means.
Thanks in advance
 
Physics news on Phys.org


The ":" means all columns (or all rows if it were the 1st argument).

I think the [i j] in the first argument means row i and row j only.

So therefore A([i j],:) refers to all of (that is, all columns of) rows "i" and "j" only.

The "*" is just matrix multiplication but I guess you already know that part. :)
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
27
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
8K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K