Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Map & Match from .csv file and change Variable Name in Workspace

1 visualizzazione (ultimi 30 giorni)
Questo/a domanda è stato/a segnalato/a da SOMASHEKAR M
I would like to read a .mat file which consists of all structure field names eg a,b,c etc. I have a .csv file in which Column 1 has the same field names and in Column 2 I have the names to be replaced. Upon every instance of Column 1 names I would like to replace the workspace variabe name with corresponding column 2 value.
  4 Commenti
SOMASHEKAR M
SOMASHEKAR M il 12 Giu 2022
Hi Stephen , I would like to rename the workspace structure fieldnames as per the desired names that are present in the column 2 of the .csv file.
The table looks like this
Fieldname DesiredName
____________ ____________
'Test_Sig0' 'Test_Sig_0'
'Test_Sig' 'Test_Sig_1'
'Junk_Sig' 'Junk'
'Junk_Sig_1' 'Junk1'
While structure looks like this
Test_Sig0: {3×2 cell}
Test_Sig: {3×2 cell}
As told earlier , I would like to replace the fieldname 'Test_Sig0' with Desired name referred from the csv, 'Test_Sig_0' and delete the fieldname 'Test_Sig0'.

Risposte (0)

Questa domanda è chiusa.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by