Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


factorial of a number x
Factorial of a number x

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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];

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


square number
Square a number

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Risolto


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

oltre 5 anni fa

Carica altro