Solved

Get the mean digit

Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

9 Monate ago

Solved

Sum of a geometric series

Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

9 Monate ago

Solved

Ratio between sum of primer numbers and non-prime numbers

Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

9 Monate ago

Solved

Double the next!

Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

10 Monate ago

Solved

Just another sum (JAS)

*Task:* Write a function that takes a vector X and returns the alternating sum of X: X(1)-X(2)+X(3)-X(4)+... *Example...

10 Monate ago

Solved

Remove white spaces at the end of the input string

Remove all trailing white spaces at the end of the input strings

11 Monate ago

Solved

Check if there are white spaces in the input string

If there are white spaces in the input string, output=1 else 0

11 Monate ago

Solved

Numbers on 7-segment

This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

11 Monate ago

Solved

Word Distance - Average Sort

Based on the method of <https://www.mathworks.com/matlabcentral/cody/problems/44815-word-distance-sum this problem>, write a fun...

11 Monate ago

Solved

Word Distance - Sum

Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

11 Monate ago

Solved

Remove element(s) from cell array

You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

11 Monate ago

Solved

UICBioE240 problem 1.9

Swap the first and last columns of a matrix. So if A = [12 4 7; 5 1 4]; B = [7 4 12; 4 1 5]; ...

11 Monate ago

Solved

Cube root of max value in a vector

Find the cube root of the maximum value in a vector

11 Monate ago

Solved

Sum of logarithms

Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

11 Monate ago

Solved

Find the sides of an isosceles triangle when given its area and height from its base to apex

Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

11 Monate ago

Solved

Optimization of cylinder surface area

Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

11 Monate ago

Solved

Draw Dominos

Write a function to draw dominos. The number on each side can range from 0 to 9. For example, for an input of [3,7], your functi...

11 Monate ago

Solved

Solve The Equation

The coefficients of a system of equations are given in two vectors, x1 and x2. Write a function to solve the equation and return...

11 Monate ago

Solved

Scalar Matrix Manipulation

Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

11 Monate ago

Solved

Determine if input is odd or even

Determine if input is odd or even, sample problem

11 Monate ago

Solved

Calculate the square of a number (Super Easy)

The goal is to calculate the square (y) of a number (x). Good way to start MatLab for beginners.

11 Monate ago

Solved

Iccanobif numbers 1

There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...

11 Monate ago

Solved

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

11 Monate ago

Solved

Cannibal eating odd and even numbered men

There are N men in a queue. A cannibal eats either all odd-numbered or all even-numbered men in the queue at a time. In the fi...

12 Monate ago

Solved

Muphry's Law of MATLAB

You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...

etwa ein Jahr ago

Problem

Lunar Arithmetic (Multiplication)

<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

etwa ein Jahr ago | 3