How to create a verctor in matlab using data recorded in a text document?

  • Context: MATLAB 
  • Thread starter Thread starter da_coolest
  • Start date Start date
  • Tags Tags
    Data Matlab Text
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
da_coolest
Messages
15
Reaction score
0
There is a text document with data separated by the "," sign.

such as 58.5698, 75.2495, 57.1548...

I want to createa vector called Y in MATLAB using these datas. there are 50 values.
i opened the file with the fopen command.
And then tried with the fgetl command. but when I use the "Y(1)" command to get the first value, it produces the number 5 instead of the 58.5698.

Thanks in advance.
 
Physics news on Phys.org