Is there any easy way to change x*y production to x.*y production?

1 次查看(过去 30 天)
Is there any easy way to change x*y production to x.*y production? Hi I have huge function.m result and I numerically integrate it with quad code. but in my result, production is like x*y but for quad code I need to write them x.*y but result is really big so it is not easy and also maybe it leads to problem when I change them by hand. Therefore do you know any easy method to change them?

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-6-3
syms u v
y=2*u*v+u^2*sin(v)
z=strrep(char(y),'*','.*')

更多回答(2 个)

Matt J
Matt J 2013-6-3
编辑:Matt J 2013-6-3
The VECTORIZE command might be applicable,
>> vectorize('x*y')
ans =
x.*y

Iain
Iain 2013-6-3
Find and replace?

Community Treasure Hunt

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

Start Hunting!

Translated by