what does this code mean?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey everybody, I copied a piece of code and I am trying to translate this code to formulas in excel but I am having a hard time trying to transform this part of code:
SSB(t)=((N(:,t).*exp((-FKA*f)+(-M02*m))).*MAKA)'*WAKA;
N is 9 x 31 FKA is 9 x 1 M02 is 9 x 1 MAKA is 9 x 1 WAKA is 9 x 1
Can anyone explain to me the steps in this column? And what do the stars and dots mean?
Cheers, Ruben
0 commentaires
Réponse acceptée
Paulo Silva
le 2 Mai 2011
. before operation means that the operation is element wise
[a b].*[c d]=[a*c b*d]
' means transpose (columns turn into rows and rows into columns)
[a b]'=[a;b]
: means every element of column or row, it depends if it's before or after the comma, there are also other uses.
M(:,1) means all rows of column 1 and M(1,:) means all columns of row 1
M(:) means all elements of the array M
It can also be used to create vectors like this
v=1:0.1:10; %creates a vector with elements starting at 1 with 0.1 increment and ending at 10
M(1:10); %get the first 10 elements of the array M
Now you can understand your expression, I won't do it because by doing it you will learn better.
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!