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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 0

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 1

| accepted

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 0

| accepted

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

ongeveer 8 jaar ago | 2

| accepted

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 1

| accepted

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 0

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 1

Solved


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

ongeveer 8 jaar ago

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

ongeveer 8 jaar ago | 0

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

ongeveer 8 jaar ago | 1

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Solved


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.

ongeveer 8 jaar ago

Solved


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

ongeveer 8 jaar ago

Load more