Plot two curve of different program in same graphs

26 次查看(过去 30 天)
I have improved the program, I want to compare the difference after the improvement. Can I combine the curve on this two program in same graphs?

采纳的回答

KALYAN ACHARJYA
KALYAN ACHARJYA 2021-4-6
编辑:KALYAN ACHARJYA 2021-4-6
Call two programs as function, see the following example
Code 1:
function code1(x)
y=exp(x);
plot(y);
hold on;
end
Code 2:
function code2(x)
y=log(x);
plot(y);
end
Main Script:
x=0:0.01:10;
code1(x);
code2(x);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by