MATLAB Answers

Program that takes input from excel file and calculate distance and msd for each point!

6 views (last 30 days)
SANKET PATIL
SANKET PATIL on 26 Oct 2019
Answered: Cris LaPierre on 27 Oct 2019
I am assigned to write a code which takes input from an excel sheet containing observation no., x coordinate, y coordinate and time tag and calculate the msd (mean square displacement) for the entire data. I got the basic idea that I need to get some 'for' loops going one of which will be calculating the distance between two consecutive points. I'm new to MatLab so I'm quite unable to figure out how to write the code. It'll be really helpful for y'all if you can tell me the best way to counter this problem!
Thanks to all of you!

  0 Comments

Sign in to comment.

Answers (1)

Cris LaPierre
Cris LaPierre on 27 Oct 2019
I'd recommend you start by learning the fundamentals of MATLAB. For this, I'd suggest completing MATLAB Onramp. It's an interactive, self-paced course that can complete in a few hours.
You might not have to loop through each point. If the calculation is all the same for each point (and it sounds like it should be), MATLAB can perform the calcualtion on all elements in the array at the same time.
I'd suggest you look into using readtable to get your data into MATLAB. Then use what you learn in Onramp to code up your equation.

  0 Comments

Sign in to comment.

Sign in to answer this question.