Risolto


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

oltre 6 anni fa

Risolto


Saving MATLAB session to a file
How to save MATLAB session to a file?

oltre 6 anni fa

Risolto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

oltre 6 anni fa

Risolto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


Divisible by 21
Write a function to determine if a number is divisible by 21.

oltre 6 anni fa

Risolto


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

oltre 6 anni fa

Risolto


Vectorize the digits of an Integer
Create a vector of length N for an integer of N digits. x = 123045; x_vec = [1 2 3 0 4 5]; I happened upon a trick ...

oltre 6 anni fa

Risolto


Calculate the volume of the cube.
Example n = 3; a=volume(n); a = 27

oltre 6 anni fa

Risolto


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

oltre 6 anni fa

Domanda


(Anti)diagonal automation
Counting from the top right element to the the bottom left element of an indicative 5x5 matrix, is there a quick way to automate...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Risolto


Max of a Vector
Write a function to return the max of a vector

oltre 6 anni fa

Risolto


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

oltre 6 anni fa

Risolto


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

oltre 6 anni fa

Risolto


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

oltre 6 anni fa

Risolto


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

oltre 6 anni fa

Risolto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

oltre 6 anni fa

Risolto


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

oltre 6 anni fa

Risolto


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

oltre 6 anni fa

Risolto


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

oltre 6 anni fa

Risolto


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

oltre 6 anni fa

Domanda


How to remove non consecutive values from a vector?
I have the following vector that represents how many times consecutive values appear in a row by using the following code: ...

oltre 6 anni fa | 1 risposta | 0

1

risposta

Risolto


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

oltre 6 anni fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

oltre 6 anni fa

Risolto


Negative matrix
Change the sign of all elements in given matrix.

oltre 6 anni fa

Risolto


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

oltre 6 anni fa

Risolto


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

oltre 6 anni fa

Risolto


Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

oltre 6 anni fa

Carica altro