b=regexprep(b,'^','.^','all'); doesn't works.
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Andrei Bobrov
2013 年 7 月 8 日
編集済み: Andrei Bobrov
2013 年 7 月 8 日
syms t;
a=t^3+t*t+t^2/t;
b = vectorize(a);
その他の回答 (2 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!