Content Feed
提问
Memory efficient options for storing multiple square matrices of unequal size
Hello MATLAB community, this is my first time asking a question on these forums. My problem is that in my codebase I requi...
4 years 前 | 0 个回答 | 0
0
个回答已解决
How to subtract?
*± ± ± ± ± ± ± ± ± ± ±* * Imagine you need to subtract one...
6 years 前
已解决
Determine the square root
Determine the square root of the value the user has entered, n.
6 years 前
已解决
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
6 years 前
已解决
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...
6 years 前
已解决
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 前
已解决
Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
6 years 前
已解决
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 ...
6 years 前
已解决
Free passes for everyone!
THIS PROBLEM IS TEMPORALLY DECOMMISSIONED WHILE IT IS UPDATED. PLEASE WAIT _Simply return the name of the coolest numerical c...
6 years 前
已解决
Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...
6 years 前
已解决
Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...
6 years 前
已解决
Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...
6 years 前
已解决
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....
6 years 前
已解决
The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...
6 years 前
已解决
Predicting life and death of a memory-less light bulb
You have a light bulb that can fail any moment according to the exponential probability distribution. At any moment, the pro...
6 years 前
已解决
Energy of a photon
Given the frequency F of a photon in giga hertz. Find energy E of this photon in giga electron volts. Assume h, Planck's ...
6 years 前
已解决
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...
7 years 前
已解决
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...
7 years 前
已解决
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...
7 years 前
已解决
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...
7 years 前
已解决
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...
7 years 前
已回答
vpasolve does not handle inequalities correctly
I have worked out the solution to this problem, and hopefully it will help others. First consider an (arbitrary) inequality ...
vpasolve does not handle inequalities correctly
I have worked out the solution to this problem, and hopefully it will help others. First consider an (arbitrary) inequality ...
8 years 前 | 1
提问
vpasolve does not handle inequalities correctly
Hello MATLAB community, I am currently experiencing a problem with vpasolve's handling of inequalities, mainly them not worki...
8 years 前 | 2 个回答 | 0
2
个回答已解决
Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...
10 years 前
已解决
Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...
10 years 前
已解决
Determine if input is odd
Given the input n, return true if n is odd or false if n is even.
10 years 前