How to do the matrix calculations
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Dear all, Here is the question. I have two matrices named Matrix A(temperature data) and Matrix B(salinity data). I wanna calculate Matrix C(density data), and we know C(density) is a function of A(temperature) and B(salinity). And I hope to plot the figure, for which, density variations with the time. Best regards, Mingda


댓글 수: 3
Image Analyst
2014년 1월 12일
Where is the question? You didn't actually ask one. All we know is that you have the (badly-named) matrices A and B and you want to calculate C. You didn't give us the formula to compute C based on A and B so I guess you know that. I don't know if you already have C and need to find out the function of A and B, OR you already know the function and just want to find out the best way to apply the function to generate C. And I'm sure you know about the plot() function so I'm not sure what "plot the figure" means. I'm sure you know how you could plot temp5, temp6, ...salinity4, or salinity 5 with the plot() function. But I don't know what "figure" you're talking about and how a "figure" could be plotted. A figure is a GUI that has various controls on it like buttons, axes, scrollbars, etc. What do you mean you want to plot that?
Mingda Wang
2014년 1월 12일
편집: Matt J
2014년 1월 12일
Amit
2014년 1월 12일
The equation you wrote are right and should give you the answer. Isn't rho the solution you want? Are you having trouble exporting the data as vector T for temperature and S for salinity?
답변 (2개)
Youssef Khmou
2014년 1월 12일
0 개 추천
As you have the formula, you can get C given rho0 and rho are known :
C=(rho-rho0-A*S-B*S^(3/2))*inv(S);
댓글 수: 3
Mingda Wang
2014년 1월 13일
Youssef Khmou
2014년 1월 13일
alright Mingda, so is the problem solved ?
Mingda Wang
2014년 1월 13일
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
