Solved

Area of a circle

Given the radius x, y would be the area of a circle. Pi = 3.1416

3 years ago

Solved

If you have matrix A, create matrix B using matrix A as an "element"

A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

3 years ago

Solved

Vector with a repeated entry

Create a row vector of length n, filled with 5's. For example, if n = 3, output = [4 4 4] Hint: Search for the function...

3 years ago

Solved

Is my wife really right?

For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = '...

3 years ago

Solved

Create formatted value string Cell array of a vector

This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

3 years ago

Solved

Multielement indexing of a row array

The row array birthRateChina stores the China birth rate (per 1000 people) for years 2000 to 2012. Write a statement that create...

3 years ago

Solved

Lightning strike distance: Writing a function

Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

3 years ago

Solved

Pizza value using expression with parentheses

Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

3 years ago

Solved

Fahrenheit to Celsius using multiple statements

Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

3 years ago

Solved

Simple equation: Annual salary

Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

3 years ago

Solved

design a magic matrix without using the command magic.

Like magic(4) = 16 3 2 13;5 10 11 8;9 6 7 12;4 15 14 1

3 years ago

Solved

UICBioE240 problem 1.17

In the expression (2+5i), how does MATLAB read the expressions A = 2+5i B = 2+5*i C = both are okay Write capital letter a...

3 years ago

Solved

UICBioE240 problem 1.18

exp(pi/5*i) and exp(pi/5i). Is there any difference in result? Write yes or no as a string.

3 years ago

Solved

UICBioE240 2.1

This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

3 years ago

Solved

multiple of nine?

Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

3 years ago

Solved

Accessing values in a cell

You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

3 years ago

Solved

house of cards

How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

3 years ago

Solved

Number of divisors of a given number

Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

3 years ago

Solved

Juggler sequence revisited

This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

3 years ago

Solved

Return the sequence element I

Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

3 years ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

3 years ago

Solved

Rotate Matrix @180 degree

Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

3 years ago

Solved

Nth roots of unity

First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

3 years ago