Author Topic: Speed of matlab  (Read 540 times)

Offline rokerda

  • Newbie
  • *
  • Posts: 1
  • Matlab Forum
    • View Profile
Speed of matlab
« on: November 25, 2011, 07:23:51 PM »
Hello,

I was wondering which of the next two is faster for Matlab to do:
v(i+1,:,:) = v(i,:,:) - (gamma*v(i,:,:) + p(i,:,:)) * sqrt(dt); -> where gamma and dt are constants and p(i,:,:) are randn numbers.
or
to read a list of data from a file for v(i+1,:,:)= "read from a file" ?
The reason I am asking this is that I have already calculated all v(:,:,:) values in another .m file but is it worth it to read it instead of doing it again?

As you can see v(:,:,:) is a 3 dimensional matrix whose size is aprox. 100k x 3 x 10k.

Thank you for your answers.
Best regards
Rok

Matlab and SimuLink Development Forum

Speed of matlab
« on: November 25, 2011, 07:23:51 PM »