2
$\begingroup$

I have input data as below:

Fk := {{F0}, {F1}, {F2}, {F3}, {F4}, {F5}, {F6}}

\[Gamma]k := {{\[Gamma]0}, {\[Gamma]1}, {\[Gamma]2}, {\[Gamma]3}, {\\[Gamma]4}, {\[Gamma]5}, {\[Gamma]6}}

\[Phi]kp1 := {{\[Phi]k1}, {\[Phi]k2}, {\[Phi]k3}, {\[Phi]k4}, \{\[Phi]k5}, {\[Phi]k6}, {\[Phi]k7}}

And have to calculate this formula:

 Qk=Fk*Cos[[Phi]kp1]/Sin[[Gamma]k]

And my question: How can we calculate the Qk without input FK, [Gama]k, [Phi]kp1 looking like

   Fk := {{F0}, {F1}, {F2}, {F3}, {F4}, {F5}, {F6}},...

I mean how we can put only k= number such as 6 and get the result Qk=[Q1,Q2...].

K=6, Function Fk Function [Gama]k Function [Phi]kp1 Function Qk=Fk*Cos[[Phi]kp1]/Sin[[Gamma]k] And get the results: Qk=[Q1,Q2...]

$\endgroup$
4
$\begingroup$

Try using Array -- hence

k = 6;
ff = Array[f, k];
gam = Array[g, k];
phi = Array[p, k];

Then your calculation is:

q = ff*Cos[phi]/Sin[gam]
$\endgroup$
1
  • $\begingroup$ Thank you so much. It is exactly what I need. $\endgroup$ – Vô Danh May 8 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.