Vectorial Product and Matrix Product
Show older comments
I have A*vxr where:
A is a matrix 3x3
v a vector 3x1
r a vector 3x1
and * rapresents the matrix product and x the vectorial product.
The question is: should i do the vectorial or the matrix product first?
11 Comments
Torsten
on 16 Apr 2023
I don't know of a rule in this case like "multiplication comes before addition". So without brackets set, it's ambiguous, I think.
Venkatanarasimha Hegde
on 16 Apr 2023
Can you please specify for what application you are using this multiplication
Andrea Cesaro
on 16 Apr 2023
the cyclist
on 16 Apr 2023
The formula you have posted here makes the order of operations very clear.
I'm not sure how to answer your question, partly because I'm not sure which parts of the math formula correspond to what you chose to call A and v.
Do you have your MATLAB code where you calculate mu_i_i?
Torsten
on 16 Apr 2023
I'm not sure how to answer your question, partly because I'm not sure which parts of the math formula correspond to what you chose to call A and v.
I think it's the last term in the first line.
Andrea Cesaro
on 16 Apr 2023
the cyclist
on 16 Apr 2023
Aaah. I had not even seen that term, because I hadn't noticed that the image was not fully visible, and needed to be scrolled. The expression seems ambiguous as written.
This isn't really a MATLAB question, of course. Maybe the source discusses the notation and conventions?
Or maybe you could calculate for a special case where the value of mu_i_i is known, and see which method gives that known result?
Andrea Cesaro
on 16 Apr 2023
Venkatanarasimha Hegde
on 16 Apr 2023
I think this has to do with tensor algebra. You have to look into tensor multiplication. Rather than just getting into expression,I would recommend you to understand the derivation of that ( you will physically understand which term is physically multiplied to another term).
Walter Roberson
on 16 Apr 2023
I think it quite likely that the R f calculation is done before the x calculation.
Andrea Cesaro
on 17 Apr 2023
Answers (0)
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
