Hi guys i have the follwoing code that I am stuggling to get running.
Any help would be appreaciated?
% The Given Data
x_1=4; %Assign Initial Values of x
y_1=0; %Assign Initial Values of y
t_j =Data(:,1); %assign Values of t
V_xj= Data(:,2); %Assign Values of V_xj
V_yj= Data(:,3); %Assign Values of V_yj
k = (1:4);
syms(1j)
x_k= symsum(V_xj(t_j+1 - t_j)+x_1,1i,1,k-1); %Calculate values of x_k
y_k= symsum(V_yj(t_j+1 - t_j)+y_1,1i,1,k-1); %Calculate values of y_k

3 件のコメント

Matt J
Matt J 2020 年 8 月 14 日
編集済み: Matt J 2020 年 8 月 14 日
What's it supposed to do and what kind of variable is Data (single, double,sym,...)?
Walter Roberson
Walter Roberson 2020 年 8 月 14 日
My guess is that
x_k = symsum(V_xj(t_j+1 - t_j)+x_1,1i,1,k-1)
is intended to represent
Adrian Rodgers
Adrian Rodgers 2020 年 8 月 14 日
correct walter

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2020 年 8 月 14 日

1 投票

My guess:
x_k = sum(diff(t_j(1:k)) .* V_xj(1:k-1) + x_1);
but the x_1 does not make sense to me in that location: why would you want to add it for each k value?
... When k = 1, is x_k intended to refer to the same place thing as x_1 ?

2 件のコメント

Adrian Rodgers
Adrian Rodgers 2020 年 8 月 14 日
thanks Walter x_1 is the intial location.
Walter Roberson
Walter Roberson 2020 年 8 月 14 日
It would make more sense to me if you were adding instead of -- though in that case you would have to work iteratively.
It looks to me as if can be created from as

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by