解決済み


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

9年以上 前

解決済み


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

9年以上 前

解決済み


Evaluating a polynomial
Given the following polynomial and the value for x, determine y. y = 3x^5 – x^3 + 8x – 3 Example x = 1 y = 3 - 1 +...

9年以上 前

解決済み


Complex number
For complex number c=a+bi, write code that will add a and b together.

9年以上 前

解決済み


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

9年以上 前

解決済み


length of a vector
Find twice the length of a given vector.

9年以上 前

解決済み


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

9年以上 前

解決済み


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

9年以上 前

解決済み


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

9年以上 前

解決済み


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

9年以上 前

解決済み


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

9年以上 前

解決済み


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

9年以上 前

解決済み


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

9年以上 前

解決済み


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

9年以上 前

解決済み


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

9年以上 前

解決済み


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

9年以上 前

解決済み


Read a Soroban Abacus
*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

9年以上 前

解決済み


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

9年以上 前

解決済み


Return fibonacci sequence do not use loop and condition
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

9年以上 前

解決済み


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

9年以上 前

解決済み


asd
asd

9年以上 前

問題


Big numbers, repeated least significant digits
This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

9年以上 前 | 1 | 68 個のソルバー

問題


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

9年以上 前 | 1 | 85 個のソルバー

解決済み


Rounding
Round 10.67 and make 'y' equal to that number.

9年以上 前

解決済み


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

9年以上 前

解決済み


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

9年以上 前

解決済み


Pattern Recognition 1 - Known Unit Length
You will be given various arrays, composed of numbers or strings. For this problem, the known pattern unit length is three. Writ...

9年以上 前

解決済み


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

9年以上 前

解決済み


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

9年以上 前

解決済み


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

9年以上 前

さらに読み込む