A résolu


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

plus de 2 ans il y a

A résolu


Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

plus de 2 ans il y a

A résolu


05 - Vector Equations 3
Define the vector _dVec_: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 10) ...

plus de 2 ans il y a

A résolu


Remove the positive integers.
Given array x (of integers), remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -...

plus de 2 ans il y a

A résolu


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

plus de 2 ans il y a

A résolu


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

plus de 2 ans il y a

A résolu


03 - Matrix Variables 3
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

plus de 2 ans il y a

A résolu


Find the sum of n squares
What is the sum of the squares of the first n integers?

plus de 2 ans il y a

A résolu


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

plus de 2 ans il y a

A résolu


03 - Matrix Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

plus de 2 ans il y a

A résolu


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

plus de 2 ans il y a

A résolu


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

plus de 2 ans il y a

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

plus de 2 ans il y a

A résolu


kmph to mps
convert kilometer per hour to meter per second

plus de 2 ans il y a

A résolu


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

plus de 2 ans il y a

A résolu


Box!
Given a box, find the volume of the cube. With each side = a.

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

plus de 2 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

plus de 2 ans il y a

A résolu


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

plus de 2 ans il y a

A résolu


Determine if input is divisible by three.
Given a positive integer, n, determine if n is divisible by 3. If yes, the function should output true. If no, false.

plus de 2 ans il y a

A résolu


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

plus de 2 ans il y a

A résolu


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

plus de 2 ans il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

plus de 2 ans il y a

A résolu


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


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

plus de 2 ans il y a

A résolu


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

plus de 2 ans il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

plus de 2 ans il y a

Charger plus