Gelöst


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

fast 4 Jahre vor

Gelöst


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

fast 4 Jahre vor

Gelöst


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

fast 4 Jahre vor

Gelöst


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

fast 4 Jahre vor

Gelöst


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

fast 4 Jahre vor

Gelöst


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

fast 4 Jahre vor

Gelöst


Min of a Matrix
Return the minimum value in the given matrix.

fast 4 Jahre vor

Gelöst


factorial of a number x
Factorial of a number x

fast 4 Jahre vor

Gelöst


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

fast 4 Jahre vor

Gelöst


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

fast 4 Jahre vor

Gelöst


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

fast 4 Jahre vor

Gelöst


square number
Square a number

fast 4 Jahre vor

Gelöst


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

fast 4 Jahre vor

Gelöst


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

fast 4 Jahre vor

Gelöst


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

fast 4 Jahre vor

Gelöst


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

fast 4 Jahre vor

Gelöst


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

fast 4 Jahre vor

Gelöst


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

fast 4 Jahre vor

Gelöst


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

fast 4 Jahre vor

Gelöst


05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

fast 4 Jahre vor

Gelöst


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

fast 4 Jahre vor

Gelöst


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

fast 4 Jahre vor

Gelöst


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

fast 4 Jahre vor

Gelöst


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

fast 4 Jahre vor

Gelöst


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

fast 4 Jahre vor

Gelöst


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

fast 4 Jahre vor

Mehr laden