Saving user input and write into .csv file?

6 views (last 30 days)
steamrice
steamrice on 7 Feb 2020
Commented: steamrice on 10 Feb 2020
Hello, I am wondering whether it would be possible to save the user input and write into .csv?
prompt={'weight','hight','birth date'};
dlgtitle='Input';
dims=[1 35];
definput={'120kg','170cm','1998/5/2'};
answer = inputdlg(prompt,dlgtitle, dims, definput);
Thanks

Answers (1)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH on 7 Feb 2020
solution:
writecell(answer,'myfilename.csv')
and for get the file after you can use:
readcell('myfilename.csv')
  3 Comments
steamrice
steamrice on 10 Feb 2020
Thanks for the response!
I think you mentioned, "I need to emphasize that this cannot be used to add new columns to a csv file."
Does that mean its not possbile to combine the user input from prompt with the after-data-anaylsis into the same .csv?

Sign in to comment.

Tags

Products

Community Treasure Hunt

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

Start Hunting!

Translated by