# MATLAB: Plotting two curves together in one graph for different intervals

MATLABplot

Hi,
I have two functions that I want to plot for differnt intervals. I wrote a code but the output is kinda wiered. Can someone please help me what I am doing wrong with the code?
My functions are:
``f(x1)= 22528*((0.2808-0.1031)*x +(0.1666-0.2808)*(144728064/(22528-x))+0.2808*(72982528/x)+0.1031*(22528)) from [0 to 7552.2278]f(x2)= 22528*((0.2808-0.1031)*x +(0.1666-0.1031)*(72982528/x)+0.1031*(144728064/(22528-x))+0.1031*(22528)) from [7552.2278 to 22528]I wrote below code but got strange output,y_1 = @(x) 22528.*((0.2808-0.1031).*x +(0.1666-0.2808).*(144728064 ./(22528-x))+0.2808.*(72982528./x)+0.1031.*(22528))y_2 = @(x) 22528.*((0.2808-0.1031).*x + (0.1666-0.1031).*(72982528./x)+0.1031.*(144728064./(22528-x))+0.1031.*(22528)) x_1 = 0:0.1:7552.2278;  // y_1 Intervalx_2 = 7552.2278:0.1:22528;  //y_2 Intervalplot(x_1,y_1(x_1),'b',x_2,y_2(x_2),'b')Please help me what I am doing wrong? Also I want to get all minimum points how I write the code for that?``

``y_1 = @(x) 22528.*((0.2808-0.1031).*x +(0.1666-0.2808).*(144728064 ./(22528-x))+0.2808.*(72982528./x)+0.1031.*(22528));y_2 = @(x) 22528.*((0.2808-0.1031).*x + (0.1666-0.1031).*(72982528./x)+0.1031.*(144728064./(22528-x))+0.1031.*(22528));x_1 = [0 7552.2278];  % y_1 Intervalx_2 = [7552.2278 22528];  % y_2 Intervalfigure;fplot(y_1,x_1);hold onfplot(y_2,x_2);``
``x_min = fminsearch(y_2,min(x_2));``