Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 0

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 2

| akzeptiert

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 1

| akzeptiert

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 0

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 1

Gelöst


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

mehr als 9 Jahre vor

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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.

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Mehr laden