help > Error exporting NBS results to .txt matrix
Showing 1-6 of 6 posts
Jun 14, 2014 11:06 PM | Juan Pablo Princich - Neurociencias Hospital El Cruce, Buenos Aires
Error exporting NBS results to .txt matrix
Hello , everyone!
I´ve try to save a .txt matrix with the significant results i got on NBS following the user manual indications...
And i was able to see the the results as sugested...
>> global nbs
>> nbs
nbs =
GLM: [1x1 struct]
NBS: [1x1 struct]
STATS: [1x1 struct]
UI: [1x1 struct]
But i get stuck in the process of retrieving the "Adjacency Matrix for Significant Network"
I can run the first line of the expresion along with the incomplete adj matrix as follows...
global nbs; adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
>> adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}
adj =
(3,7) 2
(4,7) 2
(5,7) 2
(1,8) 2
(3,8) 2
(4,8) 2
(3,9) 2
(3,10) 2
(3,11) 2
(4,11) 2
(1,12) 2
(3,12) 2
(7,17) 2
(11,17) 2
(12,21) 2
(9,23) 2
(10,23) 2
(8,27) 2
(10,27) 2
(11,27) 2
(7,28) 2
(11,28) 2
(9,29) 2
(10,29) 2
(12,29) 2
(10,33) 2
(7,35) 2
(8,35) 2
(9,35) 2
(10,35) 2
(11,35) 2
(12,35) 2
(25,35) 2
(8,42) 2
(9,42) 2
(10,42) 2
(14,42) 2
(7,46) 2
(8,46) 2
(9,46) 2
(10,46) 2
(35,48) 2
(42,48) 2
(3,49) 2
(13,49) 2
(19,49) 2
(26,49) 2
(33,49) 2
(35,49) 2
(41,49) 2
(42,49) 2
(45,49) 2
(46,49) 2
(3,51) 2
(5,51) 2
(17,51) 2
(19,51) 2
(21,51) 2
(22,51) 2
(24,51) 2
(27,51) 2
(29,51) 2
(32,51) 2
(35,51) 2
(36,51) 2
(40,51) 2
(41,51) 2
(45,51) 2
(46,51) 2
(17,52) 2
(44,52) 2
(1,53) 2
(17,54) 2
(29,54) 2
(51,55) 2
(3,57) 2
(27,57) 2
(41,57) 2
(42,57) 2
(44,57) 2
(17,58) 2
(3,63) 2
(4,63) 2
(17,63) 2
(20,63) 2
(23,63) 2
(26,63) 2
(27,63) 2
(29,63) 2
(33,63) 2
(35,63) 2
(41,63) 2
(42,63) 2
(45,63) 2
(46,63) 2
(17,69) 2
(27,69) 2
(41,69) 2
(42,69) 2
(46,69) 2
(42,73) 2
(3,78) 2
(15,78) 2
(29,78) 2
(33,78) 2
(35,78) 2
(39,78) 2
(42,78) 2
(46,78) 2
(3,80) 2
(15,80) 2
(29,80) 2
(31,80) 2
(35,80) 2
(42,80) 2
(46,80) 2
But i get an error when trying to export to asci and delimite the full matrix with..
dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d');
I get the following error:
>> dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
??? dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
|
Error: The input character is not valid in MATLAB statements or expressions.
Any help will be wellcome!
Cheers
Juan Pablo
I´ve try to save a .txt matrix with the significant results i got on NBS following the user manual indications...
And i was able to see the the results as sugested...
>> global nbs
>> nbs
nbs =
GLM: [1x1 struct]
NBS: [1x1 struct]
STATS: [1x1 struct]
UI: [1x1 struct]
But i get stuck in the process of retrieving the "Adjacency Matrix for Significant Network"
I can run the first line of the expresion along with the incomplete adj matrix as follows...
global nbs; adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
>> adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}
adj =
(3,7) 2
(4,7) 2
(5,7) 2
(1,8) 2
(3,8) 2
(4,8) 2
(3,9) 2
(3,10) 2
(3,11) 2
(4,11) 2
(1,12) 2
(3,12) 2
(7,17) 2
(11,17) 2
(12,21) 2
(9,23) 2
(10,23) 2
(8,27) 2
(10,27) 2
(11,27) 2
(7,28) 2
(11,28) 2
(9,29) 2
(10,29) 2
(12,29) 2
(10,33) 2
(7,35) 2
(8,35) 2
(9,35) 2
(10,35) 2
(11,35) 2
(12,35) 2
(25,35) 2
(8,42) 2
(9,42) 2
(10,42) 2
(14,42) 2
(7,46) 2
(8,46) 2
(9,46) 2
(10,46) 2
(35,48) 2
(42,48) 2
(3,49) 2
(13,49) 2
(19,49) 2
(26,49) 2
(33,49) 2
(35,49) 2
(41,49) 2
(42,49) 2
(45,49) 2
(46,49) 2
(3,51) 2
(5,51) 2
(17,51) 2
(19,51) 2
(21,51) 2
(22,51) 2
(24,51) 2
(27,51) 2
(29,51) 2
(32,51) 2
(35,51) 2
(36,51) 2
(40,51) 2
(41,51) 2
(45,51) 2
(46,51) 2
(17,52) 2
(44,52) 2
(1,53) 2
(17,54) 2
(29,54) 2
(51,55) 2
(3,57) 2
(27,57) 2
(41,57) 2
(42,57) 2
(44,57) 2
(17,58) 2
(3,63) 2
(4,63) 2
(17,63) 2
(20,63) 2
(23,63) 2
(26,63) 2
(27,63) 2
(29,63) 2
(33,63) 2
(35,63) 2
(41,63) 2
(42,63) 2
(45,63) 2
(46,63) 2
(17,69) 2
(27,69) 2
(41,69) 2
(42,69) 2
(46,69) 2
(42,73) 2
(3,78) 2
(15,78) 2
(29,78) 2
(33,78) 2
(35,78) 2
(39,78) 2
(42,78) 2
(46,78) 2
(3,80) 2
(15,80) 2
(29,80) 2
(31,80) 2
(35,80) 2
(42,80) 2
(46,80) 2
But i get an error when trying to export to asci and delimite the full matrix with..
dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d');
I get the following error:
>> dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
??? dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
|
Error: The input character is not valid in MATLAB statements or expressions.
Any help will be wellcome!
Cheers
Juan Pablo
Jun 15, 2014 01:06 AM | Andrew Zalesky
RE: Error exporting NBS results to .txt matrix
You have used:
adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}
But as shown in the manual, you should use:
adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}
But as shown in the manual, you should use:
adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
Jun 15, 2014 02:06 AM | Juan Pablo Princich - Neurociencias Hospital El Cruce, Buenos Aires
RE: Error exporting NBS results to .txt matrix
Thnaks again professor for your fast and kind resposne.
The first line worked indeed ok, i have problems related to the secon row of commands related to the dlmwrite funtion.
Do you see something wrong ?
i´ve copy/pasted the command from the user´s manual pdf so i guess there should be something else.
Thanks again for your time.
Juan
The first line worked indeed ok, i have problems related to the secon row of commands related to the dlmwrite funtion.
Do you see something wrong ?
i´ve copy/pasted the command from the user´s manual pdf so i guess there should be something else.
Thanks again for your time.
Juan
Jun 18, 2014 02:06 PM | Juan Pablo Princich - Neurociencias Hospital El Cruce, Buenos Aires
RE: Error exporting NBS results to .txt matrix
Dear proffesor, i followed your suggestions but still get this
error with the function DLMWRITE
I ´am doing something wrong or maybe my matlab version ???
>> adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
adj =
(55,1) 1
(8,7) 1
(12,7) 1
(30,7) 1
(46,7) 1
(7,8) 1
(10,8) 1
(12,8) 1
(12,9) 1
(72,9) 1
(8,10) 1
(72,10) 1
(14,11) 1
(30,11) 1
(38,11) 1
(39,11) 1
(46,11) 1
(70,11) 1
(7,12) 1
(8,12) 1
(9,12) 1
(14,12) 1
(27,12) 1
(30,12) 1
(37,12) 1
(43,12) 1
(48,12) 1
(57,12) 1
(64,12) 1
(65,12) 1
(71,12) 1
(72,12) 1
(16,13) 1
(17,13) 1
(18,13) 1
(21,13) 1
(27,13) 1
(32,13) 1
(36,13) 1
(41,13) 1
(55,13) 1
(70,13) 1
(71,13) 1
(72,13) 1
(11,14) 1
(12,14) 1
(13,16) 1
(13,17) 1
(13,18) 1
(13,21) 1
(29,21) 1
(35,21) 1
(46,21) 1
(48,23) 1
(60,23) 1
(72,23) 1
(75,23) 1
(78,23) 1
(71,26) 1
(12,27) 1
(13,27) 1
(21,29) 1
(55,29) 1
(7,30) 1
(11,30) 1
(12,30) 1
(34,30) 1
(41,30) 1
(48,30) 1
(51,30) 1
(53,30) 1
(55,30) 1
(60,30) 1
(61,30) 1
(66,30) 1
(70,30) 1
(71,30) 1
(72,30) 1
(75,30) 1
(78,30) 1
(13,32) 1
(53,33) 1
(71,33) 1
(30,34) 1
(38,34) 1
(21,35) 1
(13,36) 1
(12,37) 1
(11,38) 1
(34,38) 1
(66,38) 1
(11,39) 1
(46,39) 1
(66,39) 1
(13,41) 1
(30,41) 1
(12,43) 1
(7,46) 1
(11,46) 1
(21,46) 1
(39,46) 1
(61,46) 1
(71,46) 1
(12,48) 1
(23,48) 1
(30,48) 1
(30,51) 1
(30,53) 1
(33,53) 1
(55,53) 1
(68,53) 1
(70,53) 1
(72,54) 1
(1,55) 1
(13,55) 1
(29,55) 1
(30,55) 1
(53,55) 1
(72,56) 1
(12,57) 1
(23,60) 1
(30,60) 1
(72,60) 1
(30,61) 1
(46,61) 1
(12,64) 1
(12,65) 1
(30,66) 1
(38,66) 1
(39,66) 1
(72,66) 1
(53,68) 1
(11,70) 1
(13,70) 1
(30,70) 1
(53,70) 1
(12,71) 1
(13,71) 1
(26,71) 1
(30,71) 1
(33,71) 1
(46,71) 1
(9,72) 1
(10,72) 1
(12,72) 1
(13,72) 1
(23,72) 1
(30,72) 1
(54,72) 1
(56,72) 1
(60,72) 1
(66,72) 1
(78,72) 1
(23,75) 1
(30,75) 1
(23,78) 1
(30,78) 1
(72,78) 1
>> dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
??? dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
|
Error: The input character is not valid in MATLAB statements or expressions.
I ´am doing something wrong or maybe my matlab version ???
>> adj=nbs.NBS.con_mat{1}+nbs.NBS.con_mat{1}'
adj =
(55,1) 1
(8,7) 1
(12,7) 1
(30,7) 1
(46,7) 1
(7,8) 1
(10,8) 1
(12,8) 1
(12,9) 1
(72,9) 1
(8,10) 1
(72,10) 1
(14,11) 1
(30,11) 1
(38,11) 1
(39,11) 1
(46,11) 1
(70,11) 1
(7,12) 1
(8,12) 1
(9,12) 1
(14,12) 1
(27,12) 1
(30,12) 1
(37,12) 1
(43,12) 1
(48,12) 1
(57,12) 1
(64,12) 1
(65,12) 1
(71,12) 1
(72,12) 1
(16,13) 1
(17,13) 1
(18,13) 1
(21,13) 1
(27,13) 1
(32,13) 1
(36,13) 1
(41,13) 1
(55,13) 1
(70,13) 1
(71,13) 1
(72,13) 1
(11,14) 1
(12,14) 1
(13,16) 1
(13,17) 1
(13,18) 1
(13,21) 1
(29,21) 1
(35,21) 1
(46,21) 1
(48,23) 1
(60,23) 1
(72,23) 1
(75,23) 1
(78,23) 1
(71,26) 1
(12,27) 1
(13,27) 1
(21,29) 1
(55,29) 1
(7,30) 1
(11,30) 1
(12,30) 1
(34,30) 1
(41,30) 1
(48,30) 1
(51,30) 1
(53,30) 1
(55,30) 1
(60,30) 1
(61,30) 1
(66,30) 1
(70,30) 1
(71,30) 1
(72,30) 1
(75,30) 1
(78,30) 1
(13,32) 1
(53,33) 1
(71,33) 1
(30,34) 1
(38,34) 1
(21,35) 1
(13,36) 1
(12,37) 1
(11,38) 1
(34,38) 1
(66,38) 1
(11,39) 1
(46,39) 1
(66,39) 1
(13,41) 1
(30,41) 1
(12,43) 1
(7,46) 1
(11,46) 1
(21,46) 1
(39,46) 1
(61,46) 1
(71,46) 1
(12,48) 1
(23,48) 1
(30,48) 1
(30,51) 1
(30,53) 1
(33,53) 1
(55,53) 1
(68,53) 1
(70,53) 1
(72,54) 1
(1,55) 1
(13,55) 1
(29,55) 1
(30,55) 1
(53,55) 1
(72,56) 1
(12,57) 1
(23,60) 1
(30,60) 1
(72,60) 1
(30,61) 1
(46,61) 1
(12,64) 1
(12,65) 1
(30,66) 1
(38,66) 1
(39,66) 1
(72,66) 1
(53,68) 1
(11,70) 1
(13,70) 1
(30,70) 1
(53,70) 1
(12,71) 1
(13,71) 1
(26,71) 1
(30,71) 1
(33,71) 1
(46,71) 1
(9,72) 1
(10,72) 1
(12,72) 1
(13,72) 1
(23,72) 1
(30,72) 1
(54,72) 1
(56,72) 1
(60,72) 1
(66,72) 1
(78,72) 1
(23,75) 1
(30,75) 1
(23,78) 1
(30,78) 1
(72,78) 1
>> dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
??? dlmwrite('adj.txt',full(adj),'delimiter',' ','precision','%d')
|
Error: The input character is not valid in MATLAB statements or expressions.
Jun 18, 2014 10:06 PM | Andrew Zalesky
RE: Error exporting NBS results to .txt matrix
I suggest just typing full(adj) at the Matlab command line and then
copy and paste the matrix to a text file.This achieves the same
thing as dlmwrite.
I don't know what is causing the error with dlmwrite. The syntax looks fine to me.
Andrew
I don't know what is causing the error with dlmwrite. The syntax looks fine to me.
Andrew
Jun 22, 2014 02:06 PM | Juan Pablo Princich - Neurociencias Hospital El Cruce, Buenos Aires
RE: Error exporting NBS results to .txt matrix
Thanks for the feefback
Juan
Juan
