Read Multiple Entries from Text File
이전 댓글 표시
May i know how can i import multiple entries such as this:
32*0 0.237024 0.248206 39*0 0.217874 0.160635
0.193782 0.242259 0.281551 37*0 0.168798 0.178275
As for the first input, i want to create 32 separate inputs of zeros. Thank you.
채택된 답변
추가 답변 (1개)
Mathieu NOE
2021년 3월 16일
hello
you can concatenate datas and vectors of zeros like that :
a = [zeros(1,32) 0.237024 0.248206 zeros(1,39) 0.217874 0.160635];
b = [0.193782 0.242259 0.281551 zeros(1,37) 0.168798 0.178275];
댓글 수: 3
Jey Ganasan
2021년 3월 16일
Mathieu NOE
2021년 3월 16일
ok
so you have a text file , and each line must be converted to a numerical vector , with , for example " 10*0 " converted into zeros (1,10) ? am I right ?
Jey Ganasan
2021년 3월 16일
카테고리
도움말 센터 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!