Risolto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

quasi 5 anni fa

Risolto


04 - Scalar Equations 1
Define the variable a: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> Use this to calculate x: <<http://samle.dk/STTBD...

quasi 5 anni fa

Risolto


01 - Scalar variables
Create the following variables: <<http://samle.dk/STTBDP/Assignment1_1.png>>

quasi 5 anni fa

Risolto


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

quasi 5 anni fa

Risolto


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

quasi 5 anni fa

Risolto


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

quasi 5 anni fa

Risolto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

quasi 5 anni fa

Risolto


Negative Infinity
Round the given array a towards negative infinity.

quasi 5 anni fa

Risolto


Positive Infinity
Round the array a towards positive infinity

quasi 5 anni fa

Risolto


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

quasi 5 anni fa

Risolto


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

quasi 5 anni fa

Risolto


Calculate the square of a number (Super Easy)
The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

quasi 5 anni fa

Risolto


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: ...

quasi 5 anni fa

Risolto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

quasi 5 anni fa

Risolto


length of a vector
Find twice the length of a given vector.

quasi 5 anni fa

Risolto


Add two numbers
Add two numbers (For beginners)

quasi 5 anni fa

Risolto


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

quasi 5 anni fa

Risolto


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

quasi 5 anni fa

Risolto


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

quasi 5 anni fa

Risolto


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

quasi 5 anni fa

Risolto


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

quasi 5 anni fa

Risolto


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

quasi 5 anni fa

Risolto


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

quasi 5 anni fa

Risolto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

quasi 5 anni fa

Risolto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

quasi 5 anni fa

Risolto


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

quasi 5 anni fa

Risolto


Close MATLAB with keyboard
Close MATLAB with keyboard without using mouse

quasi 5 anni fa

Risolto


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

quasi 5 anni fa

Risolto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

quasi 5 anni fa

Risolto


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

quasi 5 anni fa

Carica altro