NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Lab5_1
clc
clear
x=input('Podaj wartosc x: ');
y=wielomian(x);
z1=abs(5*y-10);
z2=3+(y-1)^2/(2*y+1);

save('wyniki.mat','y','z1','z2');
clear

disp('Wciśnij 1 aby wyświetlić y');
disp('Wciśnij 2 aby wyświetlić z1');
disp('Wciśnij 3 aby wyświetlić z2');

i=input('Jaka wartosc chcesz wyswietlic: ');


while 1
if i==1 || i==2 || i==3
break;
else
disp('Nie ma takiej wartości!');
i=input('Podaj wartość ponownie: ');

end
end

if i==1
A=load('wyniki.mat','y');
disp(A)
elseif i==2
B=load('wyniki.mat','z1');
disp(B)
else
C=load('wyniki.mat','z2');
disp(C)
end

==========================================================================================================

function y=wielomian(x)
y=5*x.^2+3*x-2.5;


==================================================================================================================
Lab5_2

clc
clear
a=input('Podaj pierwszy bok prostokata: ');
b=input('Podaj drugi bok prostokata: ');
[pole,obwod]=prostokat(a,b);
siatka=200;

if siatka>obwod
y=siatka-obwod;
y=round(y,2);
save('siatka.txt','-ascii','pole','obwod','siatka','y');
clear
A=load('siatka.txt','pole','obwod','siatka','y');
disp(['Pole wynosi: ',num2str(A(1,1)),'m']);
disp(['Obwod wynosi: ',num2str(A(2,1)),'m']);
disp(['Posiadana siatka: ',num2str(A(3,1)),'m']);
disp(['Pozostalo siatki: ',num2str(A(4,1)),'m']);
elseif siatka<obwod
y=obwod-siatka;
y=round(y,2);
save('siatka.txt','-ascii','pole','obwod','siatka','y');
clear
A=load('siatka.txt','pole','obwod','siatka','y');
disp(['Pole wynosi: ',num2str(A(1,1)),'m']);
disp(['Obwod wynosi: ',num2str(A(2,1)),'m']);
disp(['Posiadana siatka: ',num2str(A(3,1)),'m']);
disp(['Zabraklo siatki: ',num2str(A(4,1)),'m']);
else
disp('Siatki starczyło wsam raz');
end


============================================================================================================

function [pole,obwod]=prostokat(a,b)
pole=a*b;
pole=round(pole,2);
obwod=2*a+2*b;
obwod=round(obwod,2);
     
 
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.