Why is this code not reading the csv file?

2 views (last 30 days)
Ryan Marsden
Ryan Marsden on 29 Oct 2019
Commented: Ryan Marsden on 30 Oct 2019
Hi I'm new to MatLab, and I have been trying to run the code inorder to create a PSD plot. However, I can't really figure out where or why it is falling down. Anyone have any ideas or know why? I have attached a picture of the code and the table in matlab...

Answers (1)

Alex Mcaulley
Alex Mcaulley on 29 Oct 2019
The images are useless, but the error is clear, your variable tdata doesn't exist. I guess you need to change this line:
tdata = readtable(fname);
  5 Comments
Ryan Marsden
Ryan Marsden on 30 Oct 2019
I guess to give a bit of context, I have been using another code which can import the files I need can process them. However, the PSD plot is not the in the sytle we would like (in terms of axis) so I have been give this, which is the older code to try and made the PSD plot. The new code uses serveral different .m files and I am struggling to follow that code through. Hence why i have opted to try and modify this on.

Sign in to comment.

Tags

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!