NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

clc
clear
disp('zadanie 1 prosta i parabola na jednym wykresie');
disp('zadanie 2 prosta i parabola na dwoch wykresach');
disp('zadanie 3 suma kolejnych liczb naturalnych');
a=input('podaj nr zadania 1-3: ');

x=-5:0.1:5;
x1=0:0.1:10;
y=2*x-1;
y1=x.^2;
y2=2*x1-a;



if a==1
plot(x,y,'-xb',x,y1,':k');
grid;
title('zadanie 1');
legend('funkcja1','funkcja2');
xlabel('X');
ylabel('Y');
text(1,0,'punkt wspolny funkcji');

elseif a==2
subplot(1,2,1);
plot(x1,y2,'-.k');
grid;
title('zadanie 2 prosta');
legend('prosta 2x-1');
xlabel('x_1');
ylabel('2x-1');
text(2,3,'punkt x^{alpha}');

subplot(1,2,2);
plot(x,y1,'--r');
grid;
title('zadanie 2 parabola');
legend('parabola x^2');
xlabel('X');
ylabel('x^2');
text(1,0,'miejsce zerowe^{tau}');


elseif a==3
b=input('podaj liczbe do ktorej chcesz liczyc sume= ');
if b>0;
k=0;
suma=0;
while b>k
k=k+1;
suma=suma+k;
end
disp(['suma wynosi= ',num2str(suma)]);
else
disp('mialy byc naturalne panie profesorze');
end

else
disp('zly numer zadania');

end


















clc
clear
disp('zadanie 1 funkcje sin i cos w jednym oknie');
disp('zadanie 2 funkcje sin i cos w osobnych oknach');
disp('zadanie 3 silnia');
a=input('podaj numer zadania: ');


x=(-2*pi:0.1:2*pi);
x1=(0:0.1:2*pi);
y=sin(x);
y1=cos(x);
y2=sin(x1);
y3=cos(x1);

switch(a)
case 1
plot(x,y,':xr',x,y1,'-.b');
grid;
title('zadanie_1 funkcja sin i cos na jednym wykresie');
legend('sin(x)','cos(x)');
xlabel('X');
ylabel('Y');
text(0,0,'punkt na wykresie sin^{tau}');


case 2
subplot(2,1,1);
plot(x1,y2,'--b');
grid;
title('wykres sin alpha');
legend('sinus x');
xlabel('X_1');
ylabel('sin /alpha');
text(1/2*pi,1,'maksymalny wynik');
subplot(2,1,2);
plot(x1,y3,'-.k');
grid;
title('wykres funkcji cos_x1');
legend('cosinus x');
xlabel('X_1');
ylabel('cos x');
text(0,1,'maksymalny wynik');


case 3
b=input('podaj liczbe ktorej silnie chcesz obliczyc');
if b<0
disp('z ujemnej nie ma silni panie profesorze');
else
silnia=1;
k=1;
while k<b
k=k+1;
silnia=silnia*k;

end
disp(['silnia wynosi= ',num2str(silnia)]);
end

otherwise
disp('zly numer zadania');
end

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.