Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

mer än 5 år ago

Solved


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

mer än 5 år ago

Solved


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

mer än 5 år ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

mer än 5 år ago

Solved


05 - Vector Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

mer än 5 år ago

Solved


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

mer än 5 år ago

Solved


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

mer än 5 år ago

Solved


Times 3 problem
When you enter the number, it should return the number multiplied by 3

mer än 5 år ago

Solved


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

mer än 5 år ago

Solved


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

mer än 5 år ago

Solved


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

mer än 5 år ago

Solved


04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

mer än 5 år ago

Solved


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

mer än 5 år ago

Solved


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.

mer än 5 år ago

Solved


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

mer än 5 år ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

mer än 5 år ago

Solved


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

mer än 5 år ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

mer än 5 år ago

Solved


Square root of a number
Write a code that will output the square root of x.

mer än 5 år ago

Solved


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

mer än 5 år ago

Solved


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

mer än 5 år ago

Solved


Matlab Basics - Assigning Variables
Assign different types of data to variables: integer, double, and strings Example: A is a double, for example 2.34 B is a...

mer än 5 år ago

Solved


Your favourite city!
Type your favourite city.

mer än 5 år ago

Solved


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

mer än 5 år ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

mer än 5 år ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

mer än 5 år ago

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

mer än 5 år ago

Solved


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

mer än 5 år ago

Solved


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

mer än 5 år ago

Solved


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

mer än 5 år ago

Load more