• Home
  • About Us
  • Contact Us
  • Privacy Policy
  • Special Offers
Business Intelligence Info
  • Business Intelligence
    • BI News and Info
    • Big Data
    • Mobile and Cloud
    • Self-Service BI
  • CRM
    • CRM News and Info
    • InfusionSoft
    • Microsoft Dynamics CRM
    • NetSuite
    • OnContact
    • Salesforce
    • Workbooks
  • Data Mining
    • Pentaho
    • Sisense
    • Tableau
    • TIBCO Spotfire
  • Data Warehousing
    • DWH News and Info
    • IBM DB2
    • Microsoft SQL Server
    • Oracle
    • Teradata
  • Predictive Analytics
    • FICO
    • KNIME
    • Mathematica
    • Matlab
    • Minitab
    • RapidMiner
    • Revolution
    • SAP
    • SAS/SPSS
  • Humor

Exporting lists to text files with specific names

June 5, 2017   BI News and Info
 Exporting lists to text files with specific names

I am working with two matrices (because I have more matrices with indices (1,2,3,...) I write them below in specific format i. e. m1[1] and m2[1])

m1[1]={{-1, 1, 0, -1, -1}, {-1, -1, 1, -1, -1}, {-1, 1, -1, -1, 0}, {0, 1, -1, -1, -1}, {-1, 1, -1, -1, 1}};
m2[1]={{2, 0, 1, 1, 0}, {2, 2, 2, 0, 1}, {2, 2, 2, 1, 0}, {1, 1, 2, 0, 2}, {1, 1, 1, 0, 0}};

with the below code I can gain eigenvectors in any iterations

Do[n=1; list[n,Round[10*i+1]]=Eigenvectors[m2[1]+i*m1[1]],{i,0,1,0.1}];

For example for: n=1, 10*i+1=1 we have

list[1,1]={{-0.286453 + 0. I, -0.553253 + 0. I, -0.587952 + 0. I, -0.449042 + 
0. I, -0.254027 + 0. I},  {-0.634291 + 0. I, 0.226217 + 0.328308 I, 
   0.365464 - 0.211538 I, 0.463629 - 0.163831 I, 
  0.0476698 + 0.127813 I}, {-0.634291 + 0. I, 0.226217 - 0.328308 I, 
  0.365464 + 0.211538 I, 0.463629 + 0.163831 I, 
  0.0476698 - 0.127813 I}, {-0.0911882 + 0.0499775 I, 
 0.387005 + 0.0525471 I, -0.486037 - 0.163308 I, 0.69333 + 0. I, 
  0.163778 + 0.257335 I}, {-0.0911882 - 0.0499775 I, 
  0.387005 - 0.0525471 I, -0.486037 + 0.163308 I, 0.69333 + 0. I, 
   0.163778 - 0.257335 I}}

by this indices we have

list[1,1][[1]]={-0.286453 + 0. I, -0.553253 + 0. I, -0.587952 + 0. I, 
               -0.449042 +  0. I, -0.254027 + 0. I};

list[1,1][[2]]={-0.634291 + 0. I, 0.226217 + 0.328308 I, 
   0.365464 - 0.211538 I, 0.463629 - 0.163831 I, 
  0.0476698 + 0.127813 I};

and so on.

DESIRED CASE: I eagerly wish to save all eigenvectors in the individual text files by the special names. These names should be written with the format:

n-1-i-1-eig-1 and n-1-i-1-eig-2……n-1-i-1-eig-5 according to the eigenvectors
list[1,1][[1]]......list[1,1][[5]]. Furthermore, for 2i+1=2, I wish to have text files with the names : n-1-i-2-eig-1 and n-1-i-2-eig-2……n-1-i-2-eig-5. And one of them will be a column of the numbers.

I have seen many posts such as this, this, this, this and other related to exportation. But they have not helped me to choose a specific name for the exported files.

However based on the @Erich Mueller in this question this link, I can use just a list without any indices but I am comfortable to exploit of those.

Let’s block ads! (Why?)

Recent Questions – Mathematica Stack Exchange

Exporting, files, Lists, Names, Specific, Text
  • Recent Posts

    • Trump’s Note to Biden
    • FSI Blog Series, Part IV: Staying Agile in Trying Times
    • Soci raises $80 million to power data-driven localized marketing for enterprises
    • Conversational Platform Trends for 2021
    • The Great Awakening?
  • Categories

  • Archives

    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
© 2021 Business Intelligence Info
Power BI Training | G Com Solutions Limited