How to calculate multiple values of r*s²*q without entering each r value separately

  • Topic: Mathematica 
  • Thread starter Thread starter shafieza_garl
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
shafieza_garl
Messages
20
Reaction score
0
hye everyone...i would like to ask question. i just wonder how to calculate question faster without solving one by one.for my equation given.i want to know
if r increase by=1,2,3,4,5 and value of s are not change,how can i do without fill r by 1,2,3,4,5 one bye one.(q is fixed value).example
if s=1,q=3
and r is variable 1,2,3,4,5
so it become;
1(1^2)(3)=?
2(1^2)(3)=?
3(1^2)(3)=?
:
:
r(1^2)(3)=?
i want the output of all the answer in just 1 click.
i hope anyone can help me.
 
Attachments
  • test3.jpg
    test3.jpg
    1.4 KB · Views: 490
Physics news on Phys.org
I'm pretty sure that I don't understand what you want.
Do you want to generate a table of elements of the form r * s^2 * q ?

If so, then define
f[r_, s_, q_] := r * s^2 * q
and the table with s=1,q=3 is generated by
Table[f[r,1,3], {r, 1, 10}]