Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

sadadd

function[c]= bisection (f,a,b,max1);
ya=f(a);
yb=f(b);
if ya*yb>0;
disp('both end have same sign')
else
for k=1:max1;
c=(a+b)/2;
yc=f(c);
if yb*yc>0;
b=c;
yb=yc;
elseif ya*yc>0;
a=c;
ya=yc;
else
break
end
end
end
end

Execute MATLAB/Octave Online

figure;
img=imread('grapes2.jpg');
imshow(img); pause;

histcor=zeros(16);
h=hist(histcor);
for i=1:5
    sel=imcrop(img);
    m=hist(double(sel));
    imshow(sel); pause;
    h=updatehist(h,round(m));
end

mesh(histcor); pause;

Matrix.m

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

semilogy(x,y1,'-bo;y1;',x,y2,'-kx;y2;');
title('Plot title');
xlabel('X Axis');
ylabel('Y Axis');

print -dpng figure.png

beeee

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

semilogy(x,y1,'-bo;y1;',x,y2,'-kx;y2;');
title('Plot title');
xlabel('X Axis');
ylabel('Y Axis');

print -dpng figure.png

sura

x = [1 2 3 4 5 6 7 8 9 10];
y1 = [.16 .08 .04 .02 .013 .007 .004 .002 .001 .0008 ];
y2 = [.16 .07 .03 .01 .008 .003 .0008 .0003 .00007 .00002 ];

semilogy(x,y1,'-bo;y1;',x,y2,'-kx;y2;');
title('Plot title');
xlabel('X Axis');
ylabel('Y Axis');

print -dpng figure.png

Execute MATLAB/Octave Online

x = linspace(-2, 5, 100);
y = sin(x)./x;
plot(x,y);
grid

simple1

a={1,2,3}
{2;3;4}

abcd

x=linspace(-5,5,100)
y=2*x+2
plot(x,y)

text

X = rand(10, 20);

Execute MATLAB/Octave Online

pkg load symbolic 
symbols 
x = sym('x')
y = inline("2*x^3 + 3*x^2 - 12*x + 17");
ezplot(y,[-2,2])
print -deps graph.eps

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.