A résolu


Problem Set 2
Make a calculator by the four main operators (op): + - * / And the two numbers (n1, n2). Don't forget to check to divisio...

28 jours il y a

A résolu


Problem Set 1
You will get the vector "v", you should put it's length in a variable called "lngth", then... If it's length from 1 to 5, sz = ...

28 jours il y a

A résolu


Switch-Case-Otherwise
You should make random numbers to 10, by 3 rows and 3 columns. Cases from 1 to 3, b = true. Otherwise, b = false.

28 jours il y a

A résolu


NOT
If a not equal to zero, b = true, else, b = false.

28 jours il y a

A résolu


OR
If a greater than zero or c less than 10, b = true, else, b = false.

28 jours il y a

A résolu


AND
If a greater than 0 and n less than 10, b = true, else, b = false. (Checking a should be in one line by AND special sign in MAT...

28 jours il y a

A résolu


Nested If(s)
If a greater than zero, then check, if a = greater that 1 and less than 10, then b = true, else, b = false.

28 jours il y a

A résolu


If-Elseif-Else
If a more than zero, b = true, if a = zero , b = zero, else, b = false.

28 jours il y a

A résolu


If-Else
If a more than zero, b = true, else, b = false.

28 jours il y a

A résolu


If
If a more than zero, then b = true.

28 jours il y a

A résolu


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

28 jours il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

28 jours il y a

A résolu


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

28 jours il y a

A résolu


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

28 jours il y a

A résolu


Make a Plot with Functions
Make a plot and test

28 jours il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

28 jours il y a

A résolu


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

28 jours il y a

A résolu


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

28 jours il y a

A résolu


Sum of series
a(n) = n^2 - (n-1)^2 find the summation of the series upto n i.e. a(1)+a(2)+...+a(n)

28 jours il y a

A résolu


Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...

28 jours il y a

A résolu


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

28 jours il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

28 jours il y a

A résolu


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

28 jours il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

28 jours il y a

A résolu


easy problem
Find the last element of the array

28 jours il y a

A résolu


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

28 jours il y a

A résolu


Engine torque and RPM
Torque and power are related through rotational speed. Knowing brake power and engine RPM, you can back-calculate the torque del...

28 jours il y a

A résolu


Engine Thermal Efficiency
The thermal efficiency of an ideal Otto cycle engine depends only on the compression ratio. A higher compression ratio yields gr...

29 jours il y a

A résolu


MATLAB 101: Area of a circle
Write a MATLAB function named circle_area that accepts the radius r as an input and returns the area of the circle.

29 jours il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

29 jours il y a

Charger plus