Need help; Fixing error and plotting functions
Show older comments
Hi everyone,
I am working with plotting the following set of expressions. It shows some error that I can't fix. Kindly look into it and help show the plots.
x = linspace(0, 5);
y1=(-(2.844015460*(1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.787032085)*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), 2-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), (2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463))./((1+1603*x*(1/997)).*(1-x).^2.5)+2.787032085.*hypergeom(-1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), 1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), (2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463)).*(-1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))./((1+1603*x*(1/997)).*(1-x).^2.5))./(-(2.844015460*(1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.787032085)*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), 2-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), (2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463))./((1+1603*x*(1/997)).*(1-x).^2.5)+hypergeom(-1-(2.787032085.*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5), 1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x.*(1/997)).*(1-x).^2.5), (2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(-1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).^2);
plot(x,y1,'-','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} s=-0.5','LineWidth', 2.0, 'HandleVisibility','off')
xlabel('\fontname{Times New Roman} Values of x','FontSize',22)
ylabel('\fontname{Times New Roman} Values of y', 'FontSize', 22)
hold on
y2=(((-1.260902791).*(1+(.1992256641).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom(((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 2+((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), (1.260902791.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5)+.1992256641.*hypergeom(-1+((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 1+((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), (1.260902791.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463)).*(-1+(.1992256641.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5))./((1+1603.*x.*(1/997)).*(1-x).^2.5))./(-1.891354186.*hypergeom(((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 2+(-.1992256641).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5), (1.260902791.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1+(.1992256641.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5)+hypergeom(-1+((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 1+((-.1992256641).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), (1.260902791.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(-1+(.1992256641.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(-1.+(.2988384962.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)));
plot(x,y2,'-','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} s=-0.5','LineWidth', 2.0, 'HandleVisibility','off')
y3=((.2205657803.*(1-(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom((1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 2+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), ((-.2205657803).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5)-1.498354984.*hypergeom(-1+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 1+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), ((-.2205657803).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463)).*(-1-(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5))./((1+1603.*x.*(1/997)).*(1-x).^2.5))./(.4411315605.*hypergeom((1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 2+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), ((-.2205657803).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(1-4163863.*x.*(1/4166463))./((1+1603.*x.*(1/997)).*(1-x).^2.5)+hypergeom(-1+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), 1+(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5), ((-.2205657803).*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(-1-(1.498354984.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)).*(-1-(2.996709968.*(1-4163863.*x.*(1/4166463)))./((1+1603.*x.*(1/997)).*(1-x).^2.5)));
plot(x,y2,'-','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} s=-0.5','LineWidth', 2.0, 'HandleVisibility','off')
y4=(-(2.878360445.*(1+(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.820688929).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (2.878360445.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)+2.820688929.*hypergeom(-1-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (2.878360445.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463)).*(-1+(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))./((1+603.*x.*(1/997)).*(1-x).^2.5))./(-(2.878360445.*(1+(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.820688929).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (2.878360445.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)+hypergeom(-1-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1-(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (2.878360445.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(-1+(2.820688929.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).^2);
plot(x,y4,'-.','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} MWCNT','LineWidth', 2.0)
y5=(((-1.291684341).*(1+(.2040892228.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom(((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (1.291684341.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)+.2040892228.*hypergeom(-1+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (1.291684341.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463)).*(-1+(.2040892228.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))./((1+603.*x.*(1/997)).*(1-x).^2.5))./(-1.937526512.*hypergeom(((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (1.291684341.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1+(.2040892228.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)+hypergeom(-1+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1+((-.2040892228).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), (1.291684341.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(-1+(.2040892228.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(-1.+(.3061338342.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)));
plot(x,y5,'-.','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} s=1.0','LineWidth', 2.0, 'HandleVisibility','off')
y6=((.2306233919.*(1-(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))).*hypergeom((1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), ((-.2306233919).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)-1.566678694.*hypergeom(-1+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), ((-.2306233919).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463)).*(-1-(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5))./((1+603.*x.*(1/997)).*(1-x).^2.5))./(.4612467837.*hypergeom((1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 2+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), ((-.2306233919).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(1-4164863.*x.*(1/4166463))./((1+603.*x.*(1/997)).*(1-x).^2.5)+hypergeom(-1+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), 1+(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5), ((-.2306233919).*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(-1-(1.566678694.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)).*(-1-(3.133357388.*(1-4164863.*x.*(1/4166463)))./((1+603.*x.*(1/997)).*(1-x).^2.5)));
plot(x,y6,'-.','Color','[0 0 0]','DisplayName','\fontname {Helvetica} \fontsize{18} s=1.0','LineWidth', 2.0, 'HandleVisibility','off')
ax = gca; % current axes
ax.FontSize = 22;
set(gca,'XLim',[0 5]);
set(gca,'YLim',[-1 1]);
box off
hold off
Here is the error message:
Error using sym/hypergeom (line 43)
Unable to evaluate to Boolean.
Error in sym.useSymForNumeric (line 165)
res = cast(fn(args{:}),superiorfloat(varargin{:}));
Error in hypergeom (line 41)
h = sym.useSymForNumeric(@hypergeom,n,d,z);
Error in TemNuss (line 543)
y1=(-(2.844015460*(1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.787032085)*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
2-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
(2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463))./((1+1603*x*(1/997)).*(1-x).^2.5)+2.787032085.*hypergeom(-1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
(2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463)).*(-1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))./((1+1603*x*(1/997)).*(1-x).^2.5))./(-(2.844015460*(1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5))).*hypergeom(((-2.787032085)*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
2-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
(2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(1-4163863*x*(1/4166463))./((1+1603*x*(1/997)).*(1-x).^2.5)+hypergeom(-1-(2.787032085.*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5),
1-(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x.*(1/997)).*(1-x).^2.5),
(2.844015460*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).*(-1+(2.787032085*(1-4163863*x*(1/4166463)))./((1+1603*x*(1/997)).*(1-x).^2.5)).^2);
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics and Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!