A résolu


Temperature conversion
Convert temperature in degrees Celsius (C) to temperature in degrees Kelvin (K). Assume your answer is rounded to the nearest Ke...

plus de 9 ans il y a

Réponse apportée
identify duplicate rows in a matrix
You can identify the repeated rows by invoking *unique* function of Matlab, and then set to 0 non-unique rows as follows: [...

plus de 9 ans il y a | 8

| A accepté

A résolu


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

plus de 9 ans il y a

A résolu


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

plus de 9 ans il y a

A résolu


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

plus de 9 ans il y a

A résolu


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

plus de 9 ans il y a

A résolu


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

plus de 9 ans il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

plus de 9 ans il y a

A résolu


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

plus de 9 ans il y a

Réponse apportée
with or without ''options'' in matlab ''linprog''? the different?
Dear scully, "dual-simplex" or "interior-point" are different algorithms to provide a solution of the linear programming problem...

plus de 9 ans il y a | 4

Réponse apportée
How to set up different root intervals for different variables in solving a system of equations using fzero
If your equaitons are general I suggest not to use *fzero*, because this finds only the points where the objective function f(x)...

plus de 9 ans il y a | 3

| A accepté

A résolu


Determine the square root
Determine the square root of the value the user has entered, n.

plus de 9 ans il y a

A résolu


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

plus de 9 ans il y a

A résolu


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

plus de 9 ans il y a

A résolu


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

plus de 9 ans il y a

A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

plus de 9 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

plus de 9 ans il y a

A résolu


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

plus de 9 ans il y a

A résolu


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Comparing floating point values
* Assign matchFound with true if firstSample and secondSample are less than thresholdValue.

plus de 9 ans il y a

A résolu


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

plus de 9 ans il y a

A résolu


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

plus de 9 ans il y a

A résolu


Least common multiple of many numbers
1:6 -> 60

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

Charger plus