Risolto


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

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

circa 9 anni fa

Risolto


How do you make seven even?
Take away the s.

circa 9 anni fa

Risolto


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

circa 9 anni fa

Risolto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

circa 9 anni fa

Risolto


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

circa 9 anni fa

Risolto


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

circa 9 anni fa

Risolto


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

circa 9 anni fa

Risolto


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

circa 9 anni fa

Risolto


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

circa 9 anni fa

Risolto


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

circa 9 anni fa

Risolto


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

circa 9 anni fa

Risolto


true or false
if the matrix has a zero, return true. else, return false

circa 9 anni fa

Risolto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

circa 9 anni fa

Risolto


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

circa 9 anni fa

Risolto


Create an anti-identity matrix
Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

circa 9 anni fa

Risolto


Conversion from hours to mili sec
Convert given input in hours to mili seconds

circa 9 anni fa

Risolto


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

circa 9 anni fa

Risolto


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

circa 9 anni fa

Risolto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

circa 9 anni fa

Risolto


Hydrostatic Pressure
Given depth(height), in m, find the pressure under a body of water. Need to know the density of water(kg/m^3), and gravity(m/s^2...

circa 9 anni fa

Risolto


Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

circa 9 anni fa

Risolto


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

circa 9 anni fa

Risolto


vectors counting by 5
Create a vector numbers from 55 to 115 in increments of 5.

circa 9 anni fa

Risolto


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

circa 9 anni fa

Risolto


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

circa 9 anni fa

Risolto


Back to basics 5 - Clipboard
Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

circa 9 anni fa

Carica altro