回答済み
Could someone please explain...
you have defined your function with no input arguments, therefore passing any arguments to r_dat is an error. function F ...

約14年 前 | 0

解決済み


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

14年以上 前

解決済み


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

14年以上 前

解決済み


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

14年以上 前

解決済み


inner product of two vectors
inner product of two vectors

14年以上 前

回答済み
Plz xpln why nt sing vwls
I was hoping to pick up some regexp tips here...I guess not!

14年以上 前 | 0

回答済み
modify parted matrix element
x =magic(4) x = 16 2 3 13 5 11 10 8 9 7 6 12 4 14...

14年以上 前 | 0

回答済み
Find a length of string/array without length function
a variant on your code str = 'hello world'; c =0; while ~isempty(str) c = c+1; str(1)=[]; end c

14年以上 前 | 0

解決済み


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

14年以上 前

解決済み


Omit columns averages from a matrix
Omit columns averages from a matrix. For example: A = 16 2 3 13 5 11 10 8 9 7 ...

14年以上 前

回答済み
How to count no. of output result from a program
perhaps x = mean(magic(4)); counts = numel(x) is what you are after

14年以上 前 | 0

解決済み


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

14年以上 前

解決済み


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

14年以上 前

解決済み


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

14年以上 前

解決済み


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

14年以上 前

解決済み


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

14年以上 前

解決済み


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

14年以上 前

解決済み


surface of a spherical planet
you just discovered its circumference, that is the input.

14年以上 前

解決済み


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

14年以上 前

解決済み


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

14年以上 前

解決済み


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

14年以上 前

解決済み


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

14年以上 前

解決済み


All capital?
Are all the letters in the input string capital letters? Examples: 'MNOP' -> 1 'MN0P' -> 0

14年以上 前

解決済み


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

14年以上 前

解決済み


radius of a spherical planet
you just measured its surface area, that is the input.

14年以上 前

解決済み


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

14年以上 前

解決済み


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

14年以上 前

解決済み


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

14年以上 前

解決済み


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

14年以上 前

解決済み


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

14年以上 前

さらに読み込む