1
$\begingroup$

Good day,

I have a problem.

I want to run two matrix based on time given. I used TimeUsed.

given, matrix a and b;

a={{g*t, 2}, {3, 4}}
b={{3, 4}, {5, h*t}}

I use For loop:

g=Pi;
h=3 Pi/2;
b={{3, 4}, {5, h*t}};
For[t = 0, t < 15, t++, a = {{g*t, 2}, {3, 4}}; output1 = a^2; If[t> 
10, d = a . b; output2 = d^2]; Print[output1]; Print[output2];t = t + TimeUsed[]]

My problem is, I want the value of output d listed when t>10 (I mean, it will be start calculated after t>10 not from beginning i.e t=0).

How can I make the process become like that?

Please help me. Thank you.

$\endgroup$
4
  • 1
    $\begingroup$ maybe Pause function will help. $\endgroup$
    – Wjx
    Aug 8, 2016 at 8:37
  • $\begingroup$ i already read the Pause function but it cannot be used in TimeUsed $\endgroup$
    – munirah
    Aug 8, 2016 at 12:07
  • 1
    $\begingroup$ I still don't know what you want to achieve. Can you give a desired output effect? $\endgroup$
    – Wjx
    Aug 8, 2016 at 14:39
  • $\begingroup$ I want the output d appear after t>30 $\endgroup$
    – munirah
    Aug 9, 2016 at 0:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.