Code for elements in equation to create a matrix
1 view (last 30 days)
Show older comments
lo on 16 Mar 2014
Answered: Muhammad Tabish Bilal on 22 Apr 2021
D is a 1x3 matrix
f is a 3x3 matrix
I want to create a matrix of A by the following equation:
But it turns out that the answer is wrong
What should be the correct code of this equation?
Mischa Kim on 16 Mar 2014
Lo, no need to use loops:
A = 1./(f*D)
Make sure that D is a column vector.
More Answers (1)
Muhammad Tabish Bilal on 22 Apr 2021
for counter1= 1: 13 % counter for the rows of intended matrices
for counter2= 1 : 13 % counter for coloumns of intended matrices
SMO(counter1,counter2) = counter1+counter2; % here you may use the equation you want to drive a matrices from but keep in mind it should be a column matrices using the same counter of inner loop
Find more on Mathematics 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!