b=regexprep(b,'^','.^','all'); doesn't works.
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to replace ,/,^ to .,./,.^
my code:
syms t;
a='t^3+t*t+t^2/t';
b=a;
b=regexprep(b,'*','.*','all');
b=regexprep(b,'/','./','all');
b=regexprep(b,'^','.^','all');
Result I want:
a=t^3+t*t+t^2/t
b=t.^3+t.*t+t.^2./t
Real result:
a=t^3+t*t+t^2/t
b=t^3+t.*t+t^2./t
I think " b=regexprep(b,'^','.^','all');" doesn't works.
How can I fix this problem?
0 commentaires
Réponse acceptée
Andrei Bobrov
le 8 Juil 2013
Modifié(e) : Andrei Bobrov
le 8 Juil 2013
syms t;
a=t^3+t*t+t^2/t;
b = vectorize(a);
Plus de réponses (2)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!