Resuelto


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.

alrededor de 4 años hace

Resuelto


The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

alrededor de 4 años hace

Resuelto


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

alrededor de 4 años hace

Resuelto


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

alrededor de 4 años hace

Resuelto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

alrededor de 4 años hace

Resuelto


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

alrededor de 4 años hace

Resuelto


Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...

alrededor de 4 años hace

Resuelto


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

alrededor de 4 años hace

Resuelto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Product of Array
Given an array of numbers. Get the product of the array.

alrededor de 4 años hace

Resuelto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

alrededor de 4 años hace

Resuelto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

alrededor de 4 años hace

Resuelto


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

alrededor de 4 años hace

Resuelto


Calculate some equation
Using given inputs x and z, make two outputs that are y1 = (xz)/(x/z)^2 + 14x^2 - 0.8z^2 y2 = x^z - z^x + (x/z)^2 - (z/x...

alrededor de 4 años hace

Resuelto


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

alrededor de 4 años hace

Resuelto


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

alrededor de 4 años hace

Resuelto


Negative Infinity
Round the given array a towards negative infinity.

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

alrededor de 4 años hace

Resuelto


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value and the largest element in absolute value...

alrededor de 4 años hace

Resuelto


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

alrededor de 4 años hace

Resuelto


create a circulant matrix
create a circulant matrix

alrededor de 4 años hace

Resuelto


Looking for Squares
Need n squares that equal one square all together, none zero, none fractured. For example, calling squares(2) should output [16...

alrededor de 4 años hace

Resuelto


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

alrededor de 4 años hace

Resuelto


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

alrededor de 4 años hace

Resuelto


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

alrededor de 4 años hace

Resuelto


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

alrededor de 4 años hace

Cargar más