Define input and output vector/matrix

Hi guys,
I am new to use Matlab to solve functions and there is one problem that I hope you guys can help me.
The situation is, input A as a m*1 vector, like [1,2,3]; after calculation in a equation we get output B (result is a m*1 vector); then another vector input C, n*1, is involved; after input in another equation (contain both B and C) for calculation, we get result D, which should be a m*n matrix.
In this scenario, how can I define A, B, C, and finally get the result D in a matrix format?
Thanks,

답변 (1개)

Star Strider
Star Strider 2015년 8월 25일

0 개 추천

It very much depends on what the ‘calculations’ are. It could require simple matrix algebra or something more involved. Two functions that would likely be helpful are bsxfun and arrayfun.

댓글 수: 2

Mac Lin
Mac Lin 2015년 8월 25일
The calculations are simple, there are many coefficients involved, but in short, it is like B=k*A, A and B are the vectors I mentioned and k is the sum of all coefficients. Could you please help me out how to do it? Thanks
Star Strider
Star Strider 2015년 8월 25일
Is ‘k’ a scalar, vector, or matrix?
What are the sizes of all the vectors and matrices in your calculations?
In what order do you want to do them?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

태그

질문:

2015년 8월 25일

댓글:

2015년 8월 25일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by