Read Multiple Entries from Text File
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
Mathieu NOE
il 16 Mar 2021
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 Commenti
Jey Ganasan
il 16 Mar 2021
Mathieu NOE
il 16 Mar 2021
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
il 16 Mar 2021
Categorie
Scopri di più su Workspace Variables and MAT Files in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!