Resuelto


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

11 meses hace

Resuelto


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

11 meses hace

Resuelto


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

11 meses hace

Resuelto


Draw a '1' in a zero matrix!

11 meses hace

Resuelto


Draw a '7' in a zero matrix!

11 meses hace

Resuelto


Approximation of Pi
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given number of...

11 meses hace

Resuelto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

11 meses hace

Resuelto


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

11 meses hace

Resuelto


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

11 meses hace

Resuelto


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

11 meses hace

Resuelto


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

11 meses hace

Resuelto


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

11 meses hace

Resuelto


Swap between first and last column
The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

11 meses hace

Resuelto


Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

11 meses hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

12 meses hace

Resuelto


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

12 meses hace

Resuelto


Flipping a Matrix
Flipping matrix up and down. If a central row is exists, leave it, and flip remaining rows. Example Mat = magic(3) ...

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

12 meses hace

Resuelto


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

12 meses hace

Resuelto


Check Legendre's conjecture
Context and problem statement Legendre's conjecture states for a given positive integer n, there always exists at least one pri...

12 meses hace

Resuelto


UICBioE240 problem 1.4
So if A = [ 1 2 3; 4 5 6; 7 8 9] B = [ 3 3]

12 meses hace

Resuelto


Multiplication
Given 2 numbers a and b mulitply them

12 meses hace

Resuelto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

12 meses hace

Resuelto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

12 meses hace

Resuelto


Converts numbers into characters
Converts numbers into characters

12 meses hace

Resuelto


Find the max element of the array
Find the max element of the array

12 meses hace

Resuelto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

12 meses hace

Resuelto


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

12 meses hace

Resuelto


to the 2 all elements
to the 2 all elements

12 meses hace

Resuelto


the average value of the elements
Calculate the average value of the elements in the array

12 meses hace

Cargar más