Programming with matlab, coding, Lab Reports of Programming Languages

Programming with matlab, coding

Typology: Lab Reports

2018/2019

Uploaded on 12/14/2021

c-a-15
c-a-15 🇺🇸

5 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Carlyn Annunziata
MENG 201
Lab 5
Professor Liu
1) function [v,y,z,w]= statis(x);
v=mean(x);
y = std(x);
z = min(x);
w = max(x);
command window:
x = [10 20 30 40 50];
[a b c d]=statis(x)
a =
30
b =
15.8114
c =
10
d =
50
pf3

Partial preview of the text

Download Programming with matlab, coding and more Lab Reports Programming Languages in PDF only on Docsity!

Carlyn Annunziata MENG 201 Lab 5 Professor Liu

  1. function [v,y,z,w]= statis(x); v=mean(x); y = std(x); z = min(x); w = max(x); command window: x = [10 20 30 40 50]; [a b c d]=statis(x) a = 30 b =

c = 10 d = 50

2) F = 60:2:70;

>> F_C = @(F) (F-32).*5/9;

F_C(F)

ans = 15.5556 16.6667 17.7778 18.8889 20.0000 21. Alternative; Using M-file: Script window: function [C]=F_C(F) C = (F-32).*5/9; Command window: F =60:2: F = 60 62 64 66 68 70

F_C(F) ans = 15.5556 16.6667 17.7778 18.8889 20.0000 21.

  1. poly_plot = @(x) x.^2+2*x-exp(x);

fplot(poly_plot,[-2,2])