load matrix with variable from text file using fileread
1 次查看(过去 30 天)
显示 更早的评论
Hi I have a matrix eg :
[ 1 2 3 J
4 5 6 J];
I want to load this into matlab but the letter turns into NaN, i want to import the matrix into matlab then herafter ( in Matlab) define/give a value to ( J )
eg:
J = 2
I have used fileread, which is good for numbers, but turns letters to NaN
1 个评论
Giuseppe Inghilterra
2020-2-15
Can you attach a txt file sample? When I use fileread on my own I obtain a character vector and I don't have the behaviour (NaN values) that you have described.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Other Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!