Solved


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

5 years ago

Solved


only input
Return the output without writing any code into the function.

5 years ago

Solved


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

5 years ago

Solved


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

5 years ago

Solved


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

5 years ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

5 years ago

Solved


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

5 years ago

Solved


Rounding
Round 10.67 and make 'y' equal to that number.

5 years ago

Solved


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

5 years ago

Solved


Stress-Strain Properties - 3
A brittle material will not exhibit a yield point. In other words, the yield point and failure point coincide. In such cases, th...

5 years ago

Solved


Find the value of Y

5 years ago

Solved


Area of rhombus
Calculate the rhombus area

5 years ago

Solved


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

5 years ago

Solved


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

5 years ago

Solved


Return all matrix elements except elements on diagonal
Consider a given Matrix A=[a b c; d e f; g h i] then return a row vector T such that it contains all the El...

5 years ago

Solved


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

5 years ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

5 years ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

5 years ago

Solved


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

5 years ago

Solved


Stress-Strain Properties - 2
The resilience of a material is its ability to resist permanent (or plastic) deformation. The resilience coincides with the elas...

5 years ago

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

5 years ago

Solved


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

5 years ago

Solved


Electric Flux
Calculate the flux passing through a surface. E is electric field, A is area.

5 years ago

Solved


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

5 years ago

Solved


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

5 years ago

Solved


Calculate square and cube of number
Calculate square and cube of number x

5 years ago

Solved


MATLAB Basic: rounding III
Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

5 years ago

Solved


07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

5 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

5 years ago

Solved


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

5 years ago

Load more