How to save a txt file in matlab with the specified name I want?

5 visualizzazioni (ultimi 30 giorni)
Example:
filename = input('Enter the file name: ','s')
A
save(fullfile('directory path','filename.txt'),'A','-ascii')

Risposta accettata

Walter Roberson
Walter Roberson il 14 Apr 2021
fullname = fullfile('directory path', [filename '.txt']);
save(fullname, 'A', '-ascii')

Più risposte (0)

Categorie

Scopri di più su Workspace Variables and MAT-Files in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by