已解决


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

8 years 前

已解决


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

8 years 前

已解决


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

8 years 前

已解决


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

8 years 前

已回答
What folder does Matlab use to store the Command History (history.m)?
Please see the answer on the following page. <https://mathworks.com/matlabcentral/answers/97504#answer_10685>

8 years 前 | 0

已解决


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

8 years 前

已回答
I keep getting an error message for my subplot syntax? Could anyone out there look over my script, and tell me whats wrong?
This is simply a reformatted version. Please try running this: x = 0:0.1:5; y = exp(-1.2*x).*sin(10*x+5); subplot(1...

8 years 前 | 1

| 已接受

已回答
How can I write multiple sets of data from MATLAB to one sheet in excel?
You could simply call the same function a couple more times to write your required variables into the same sheet. I would als...

8 years 前 | 0

| 已接受

已回答
Can i make loop from this equation?
I don't see why you would need any loops here. Your if-else statements seem to be doing just fine. But, if your Sa and Sb v...

8 years 前 | 0

| 已接受

已回答
Editing of y-label in the step response
On the figure window, go to Edit --> Axes Properties. This will open up the property editor on the bottom of your figure window....

8 years 前 | 2

| 已接受

已解决


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

8 years 前

已解决


User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...

8 years 前

已解决


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

8 years 前

已解决


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

8 years 前

已解决


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

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

8 years 前

已解决


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

8 years 前

已回答
Does bwboundaries always returned ordered, clockwise, boundaries?
Hello David, Please look up " |help bwboundaries| " at the command line if you would like an explicit mention of this particular...

8 years 前 | 1

| 已接受

已解决


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

8 years 前

已回答
turn a table column into doubles
str2num('enter your string here'); Please note that this would only work for strings that contain numerical data

8 years 前 | 0

已解决


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

8 years 前

已回答
Creating a matrix that calculates inverse and determinants without using the det and inv commands
A *singular* matrix, by definition, is one whose determinant is zero. hence, it is *non-invertible*. In code, this would be repr...

8 years 前 | 1

已解决


Solution to Ax=b with singular A
Find solution to Ax=b problem if A is singular. Hint: Compute a minimum norm solution

8 years 前

已回答
How to perform repeated calculations on a different bin
Put all the bin data into a cell array and use <http://mathworks.com/help/matlab/ref/cellfun.html |cellfun|> all_bins_raw = ...

8 years 前 | 0

已回答
Help aligning two vectors with one centred on zero.
xreal=Pitch*((1:numel(x1)) - ceil(numel(x1)/2))

8 years 前 | 1

已解决


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

8 years 前

已解决


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

8 years 前

已解决


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

8 years 前

已解决


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

8 years 前

已解决


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

8 years 前

加载更多