フィルターのクリア

integration with vectors constants

1 回表示 (過去 30 日間)
Victoria Muntaner
Victoria Muntaner 2020 年 12 月 1 日
回答済み: Shubham Khatri 2020 年 12 月 4 日
Hello,
I am starting with MATLAB and I am trying to do an integration with constants that are vectors for an assigment.
For example I have a fuction that I want to integrate with respect to r, with r from [ro, ri];
f=(P2-P1)*(r^2-ro^2)/(4*z)*vc (it is just an example).
P2 and vc are vectors that changes with time and they are both the same length.
P2=[1;2;3] and vc=[3,4,5]
ri=2, ro=6, z=7 and are fixed values.
After i defined the values i tried with:
syms r
f=(P2-P1).*(r^2-ro^2)/(4*z).*vc
Q = int (f, r, [ro, ri])
But whenever I put the fuction I already get wrong values.
Hope you can help and thanks in advanced,
Victoria

回答 (1 件)

Shubham Khatri
Shubham Khatri 2020 年 12 月 4 日
Hello Victoria,
To my understanding, vc is a column vector where as P2 is a row vector. Please change vc to a row vector.
Hope it helps

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by