How to apply function "strrep" to more than 32 substrings?
Afficher commentaires plus anciens
Hi there,
It would be my great pleasure if anyone could assist me with the following error, caused after I applied strrep to more than 32 substrings:
newIDFFile = ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep(...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep(...
strrep( ...
strrep( ...
strrep(...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep( ...
strrep(readIDFFile, ...
'@@P1@@', (x(1))), ...
'@@P2@@', (x(2))), ...
'@@P3@@', (x(3))), ...
'@@P4@@', (x(4))), ...
'@@P5@@', (x(5))), ...
'@@P6@@', (x(6))), ...
'@@P7@@', (x(7))), ...
'@@P8@@', (x(8))), ...
'@@P9@@', (x(9))), ...
'@@P10@@', (x(10))), ...
'@@P11@@', (x(11))), ...
'@@P12@@', (x(12))), ...
'@@P13@@', (x(13))), ...
'@@P14@@', (x(14))), ...
'@@P15@@', (x(15))), ...
'@@P16@@', (x(16))), ...
'@@P17@@', (x(17))), ...
'@@P18@@', (x(18))), ...
'@@P19@@', (x(19))), ...
'@@P20@@', (x(20))), ...
'@@P21@@', (x(21))), ...
'@@P22@@', (x(22))), ...
'@@P23@@', (x(23))), ...
'@@P24@@', (x(24))), ...
'@@P25@@', (x(25))), ...
'@@P26@@', (x(26))), ...
'@@P27@@', (x(27))), ...
'@@P28@@', (x(28))), ...
'@@P29@@', (x(29))), ...
'@@P30@@', (x(30))), ...
'@@P31@@', (x(31))), ...
'@@P32@@', (x(32))), ...
'@@P33@@', (x(33))), ...
'@@P34@@', (x(34))), ...
'@@P35@@', (x(35))), ...
'@@P36@@', (x(36))), ...
'@@P37@@', (x(37))), ...
'@@P38@@', (x(38))), ...
'@@P39@@', (x(39))), ...
'@@P40@@', (x(40))), ...
'@@P41@@', (x(41))), ...
'@@P42@@', (x(42))), ...
'@@P43@@', (x(43))), ...
'@@P44@@', (x(44))), ...
'@@P45@@', (x(45))), ...
'@@P46@@', (x(46))), ...
'@@P47@@', (x(47))), ...
'@@P48@@', (x(48))), ...
'@@P49@@', (x(49))), ...
'@@P50@@', (x(50))), ...
'@@P51@@', (x(51))), ...
'@@P52@@', (x(52))), ...
'@@P53@@', (x(53))), ...
'@@P54@@', (x(54))), ...
'@@P55@@', (x(55))), ...
'@@P56@@', (x(56))), ...
'@@P57@@', (x(57))), ...
'@@P58@@', (x(58))), ...
'@@P59@@', (x(59))), ...
'@@P60@@', (x(60))), ...
'@@P61@@', (x(61))), ...
'@@P62@@', (x(62))), ...
'@@P63@@', (x(63))), ...
'@@P64@@', (x(64))), ...
'@@P65@@', (x(65))), ...
'@@P66@@', (x(66))), ...
'@@P67@@', (x(67))), ...
'@@P68@@', (x(68))), ...
'@@P69@@', (x(69))), ...
'@@P70@@', (x(70))), ...
'@@P71@@', (x(71))), ...
'@@P72@@', (x(72))), ...
'@@P73@@', (x(73))), ...
'@@P74@@', (x(74))), ...
'@@P75@@', (x(75))), ...
'@@P76@@', (x(76))), ...
'@@P77@@', (x(77))), ...
'@@P78@@', (x(78))), ...
'@@P79@@', (x(79))), ...
'@@P80@@', (x(80))), ...
'@@P81@@', (x(81))), ...
'@@P82@@', (x(82))), ...
'@@P83@@', (x(83))), ...
'@@P84@@', (x(84))), ...
'@@P85@@', (x(85))), ...
'@@P86@@', (x(86))), ...
'@@P87@@', (x(87))), ...
'@@P88@@', (x(88))), ...
'@@P89@@', (x(89))), ...
'@@P90@@', (x(90))), ...
'@@P91@@', (x(91))), ...
'@@P92@@', (x(92))), ...
'@@P93@@', (x(93))), ...
'@@P94@@', (x(94))), ...
'@@P95@@', (x(95))), ...
'@@P96@@', (x(96)));
Thanks!
1 commentaire
Mohammad Dabbagh
le 15 Oct 2020
Réponse acceptée
Plus de réponses (1)
Bruno Luong
le 15 Oct 2020
Modifié(e) : Bruno Luong
le 15 Oct 2020
newIDFFile = readIDFFile;
for k=1:length(x)
newIDFFile = strrep(newIDFFile, sprintf('@@P%d@@',k), x(k));
end
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!