Answered

How do I select specific data?

Hi Charlie, You can index a matrix using the row column indices - matrix dimensions are defined as number of rows x number of...

How do I select specific data?

Hi Charlie, You can index a matrix using the row column indices - matrix dimensions are defined as number of rows x number of...

6 years ago | 0

Solved

Tell me the slope

Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

6 years ago

Solved

Sorted highest to lowest?

Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

6 years ago

Solved

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

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

6 years ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

6 years ago

Solved

Bottles of beer

Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

6 years ago

Solved

Swap the input arguments

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

6 years ago

Solved

radius of a spherical planet

you just measured its surface area, that is the input.

6 years ago

Solved

Create a row array using double colon operator

Create a row array from 9 to 1, using the double colon operator.

6 years ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

6 years ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

6 years ago

Solved

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

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

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

6 years ago

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

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

6 years ago

Solved

Weighted average

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6 years ago

Solved

Back and Forth Rows

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

6 years ago

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

6 years ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

6 years ago

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

6 years ago

Answered

How to force an external figure in live scripts?

Hi Alex, I've found that you can select the live script in the MATLAB Current Folder view and select F9 to run it as a script...

How to force an external figure in live scripts?

Hi Alex, I've found that you can select the live script in the MATLAB Current Folder view and select F9 to run it as a script...

6 years ago | 1

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

6 years ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

6 years ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

6 years ago

Solved

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

6 years ago

Answered

Load C/C++ shared library into MATLAB - '.dll is not a valid Win32 application'

Hi Seungkook, Is the dll that you are attempting to load a 64-bit version? If not this is likely to be the issue as MATLAB 20...

Load C/C++ shared library into MATLAB - '.dll is not a valid Win32 application'

Hi Seungkook, Is the dll that you are attempting to load a 64-bit version? If not this is likely to be the issue as MATLAB 20...

6 years ago | 0