How do I include the row and column values say P = [2;4] into an equation where z = 10 + 2 (where 2 is the "x" cordinate of P? Thank you

1 vue (au cours des 30 derniers jours)
p24 = P4-P2;
p23 = Z_243*p24;
P3 = P2 + p23
%P3 outputs the values of%
%%P3 =
% 0.25
% 1.57
Now I want to add the value of 0.25 without typing 0.25 but the so called "x" cordinate of the P value into this equation
Xs = 10 + x
where x is actually 0.25, but I am unsure of how to assign the 0.25 as a variable of P

Réponses (1)

KSSV
KSSV le 23 Mai 2020
P = [2;4] ;
z = 10+P(1) ;
You should read about MATLAB array indexing.

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by