Resuelto


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

más de 8 años hace

Resuelto


y equals x divided by 2
function y = x/2

más de 8 años hace

Resuelto


UICBioE240 2.1
This will be useful later in the course, in conjunction to clc and clear all, what is the command to close all figure windows th...

más de 8 años hace

Resuelto


ASCii Code
Using Matlab get the ASCii for '?'

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

más de 8 años hace

Resuelto


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

más de 8 años hace

Resuelto


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

más de 8 años hace

Resuelto


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

más de 8 años hace

Resuelto


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

más de 8 años hace

Resuelto


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

más de 8 años hace

Resuelto


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

más de 8 años hace

Resuelto


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

más de 8 años hace

Resuelto


Box!
Given a box, find the volume of the cube. With each side = a.

más de 8 años hace

Resuelto


Times 3 problem
When you enter the number, it should return the number multiplied by 3

más de 8 años hace

Resuelto


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

más de 8 años hace

Resuelto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

más de 8 años hace

Resuelto


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

más de 8 años hace

Resuelto


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

más de 8 años hace

Resuelto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

más de 8 años hace

Resuelto


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

más de 8 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...

más de 8 años hace

Resuelto


Next Higher Power of B
|Given a number _n_ and a base _B_ greater than 1, return the lowest integer power of _B_ that is greater than or equal to _n_. ...

más de 8 años hace

Resuelto


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

más de 8 años hace

Resuelto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

más de 8 años hace

Resuelto


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

más de 8 años hace

Cargar más