what does this code mean?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Paulo Silva
2011-5-2
. 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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!