mean_speed_R, mean_speed_T and mean_speed_N are the components of mean_U0_vector. How should I express the unit vectors along R, T and N? Thanks a lot
I am writing the code as follows
mean_speed_R = mean(speed_R); %u_R_0
mean_speed_T = mean(speed_T); %u_T_0
mean_speed_N = mean(speed_N); %u_N_0
mean_U0_vector = mean_speed_R + mean_speed_T +mean_speed_N; % u_0 vector
magnitude_U0_mean_RTN = sqrt((mean_speed_R)^2 + (mean_speed_T)^2 + (mean_speed_N)^2);

 採用された回答

Voss
Voss 2024 年 3 月 13 日

0 投票

Put the components in a vector:
mean_U0_vector = [mean_speed_R, mean_speed_T, mean_speed_N]; % u_0 vector
Then the unit vectors are [1 0 0], [0 1 0], and [0 0 1].
By the way, with mean_U0_vector being a vector, you can simplify the expression for magnitude_U0_mean_RTN:
magnitude_U0_mean_RTN = sqrt(sum(mean_U0_vector.^2,2));

5 件のコメント

Ismita
Ismita 2024 年 3 月 13 日
i.e, \hat{R} = mean_speed_R
\hat{T} = mean_speed_T
\hat{N} = mean_speed_N
Am I right?
Ismita
Ismita 2024 年 3 月 13 日
thank you
Voss
Voss 2024 年 3 月 13 日
編集済み: Voss 2024 年 3 月 13 日
You're welcome!
In a legend or text object with latex interpreter, you can use \^{} syntax:
mean_speed_R = 10.5;
plot(1:10,mean_speed_R*ones(1,10))
legend(['\^{R} = ' num2str(mean_speed_R)],'Interpreter','latex','FontSize',14)
Ismita
Ismita 2024 年 3 月 14 日
Thank you so much :).
Is it possible to copy equations written in Matlab to latex directly? Thanks again.
Voss
Voss 2024 年 3 月 15 日

You're welcome!

This has some links that might be useful:

https://www.google.com/search?q=copy+equations+written+in+Matlab+to+latex+directly

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

その他の回答 (0 件)

タグ

質問済み:

2024 年 3 月 13 日

コメント済み:

2024 年 3 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by