Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


ASCii Code
Using Matlab get the ASCii for '?'

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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.

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Gelöst


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

fast 9 Jahre vor

Mehr laden