Gelöst


Equal to their cube
Tell me three real numbers that are equal to their cubes?

3 Tage vor

Gelöst


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

3 Tage vor

Gelöst


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

3 Tage vor

Gelöst


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

3 Tage vor

Gelöst


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

3 Tage vor

Gelöst


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

3 Tage vor

Gelöst


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

3 Tage vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

3 Tage vor

Gelöst


pressure to dB?
given x ratio of pressure, find corresponding y dB

3 Tage vor

Gelöst


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

3 Tage vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

3 Tage vor

Gelöst


Current through resistor
Three resistors (R2, R3, R4) are connected in parallel as shown in the figure. If this combination is connected in series with ...

3 Tage vor

Gelöst


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

3 Tage vor

Gelöst


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

3 Tage vor

Gelöst


raise 1/3
Raise a number to 1/3 power.

3 Tage vor

Gelöst


Test of Quiz
Answer the questions and write in vector. Only one answer is correct. The founder of fuzzy logic is 1a) D. Golberg 1b)...

3 Tage vor

Gelöst


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

3 Tage vor

Gelöst


Find the volume of cone
Find the volume of cone, when given radius(r) and height(h).

3 Tage vor

Gelöst


Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...

3 Tage vor

Gelöst


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

3 Tage vor

Gelöst


Calculate Reynolds Number
Write a MATLAB function that calculates the Reynolds number for flow over a flat plate: ​ ρ = fluid density (kg/m³) V = veloc...

3 Tage vor

Gelöst


Real

3 Tage vor

Gelöst


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

3 Tage vor

Gelöst


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

3 Tage vor

Gelöst


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

3 Tage vor

Mehr laden