Risolto


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

oltre 3 anni fa

Risolto


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

oltre 3 anni fa

Risolto


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

oltre 3 anni fa

Risolto


factorial of a number x
Factorial of a number x

oltre 3 anni fa

Risolto


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

oltre 3 anni fa

Risolto


Check if there are white spaces in the input string
If there are white spaces in the input string, output=1 else 0

oltre 3 anni fa

Risolto


Change matrix to vector
Vector is a matrix whose size is 1 x n or n x 1. Change matrix to vector. x = 4 3 5 1 ...

oltre 3 anni fa

Risolto


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

oltre 3 anni fa

Risolto


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

oltre 3 anni fa

Risolto


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

oltre 3 anni fa

Risolto


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

oltre 3 anni fa

Risolto


Sum of cubes
Write a program to determine sum of cubes of first n odd numbers.

oltre 3 anni fa

Risolto


Return median of a matrix
Compute median of a matrix of any dimension. Exclude the NaNs if any.

oltre 3 anni fa

Risolto


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

oltre 3 anni fa

Risolto


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

oltre 3 anni fa

Risolto


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

oltre 3 anni fa

Risolto


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

oltre 3 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]

oltre 3 anni fa

Risolto


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

oltre 3 anni fa

Risolto


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Solving Quadratic Equations (Version 2)
Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

oltre 3 anni fa

Risolto


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

oltre 3 anni fa

Risolto


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

oltre 3 anni fa

Risolto


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

oltre 3 anni fa

Risolto


Powers Of
Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

oltre 3 anni fa

Risolto


Getting the row and column location from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get <http://www.mathwo...

oltre 3 anni fa

Risolto


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

oltre 3 anni fa

Carica altro