Resuelto


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

casi 6 años hace

Resuelto


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

casi 6 años hace

Resuelto


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

casi 6 años hace

Resuelto


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

casi 6 años hace

Resuelto


Find MPG of Lightest Cars
The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


ASCii Code
Using Matlab get the ASCii for '?'

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

casi 6 años hace

Resuelto


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

casi 6 años hace

Resuelto


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

casi 6 años hace

Resuelto


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

casi 6 años hace

Resuelto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

casi 6 años hace

Resuelto


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

casi 6 años hace

Resuelto


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

casi 6 años hace

Resuelto


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

casi 6 años hace

Resuelto


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

casi 6 años hace

Resuelto


Reverse a matrix
Its simple. You have to reverse a given matrix.

casi 6 años hace

Resuelto


Concatenate two strings
Its very easy. Just concatenate two strings.

casi 6 años hace

Resuelto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

casi 6 años hace

Cargar más