How to I pass the char value dynamically
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Praveen Choudhury
il 2 Nov 2015
Commentato: Praveen Choudhury
il 2 Nov 2015
loc1 = 'D11'
loc2 = 'H11'
range = 'loc1:loc2'
range should be D11:H11 when I do loc1:loc2
How to do that?
0 Commenti
Risposta accettata
Guillaume
il 2 Nov 2015
This looks like Excel type of coordinates, so not sure what this has to do with Matlab.
To get the string 'D11:H11' with your two variables:
range = sprintf('%s:%s', loc1, loc2);
%or
range = [loc1, ':', loc2];
Personally, I prefer the first form.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Dates and Time in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!