How to use data in a structure
5 次查看(过去 30 天)
显示 更早的评论
Hi,
I used the following code A=importdata('filename'). This worked out great and gave me the data from the file in a structure "A". The structure has a matrix "data" and an array "txt" in it. How do I use that matrix / aray later in the script? I tried to set B=data and C=txt but it gave me the error of unknown variables.
Thanks
0 个评论
采纳的回答
Azzi Abdelmalek
2014-4-10
编辑:Azzi Abdelmalek
2014-4-10
If your struct variable is A
B=A.data
C=A.textdata
0 个评论
更多回答(1 个)
Alberto
2014-4-10
If all your data is inside the structure A, you should call data and txt like this:
B=A.data
C=A.txt
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!