Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

mehr als 12 Jahre vor

Gelöst


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

mehr als 12 Jahre vor

Gelöst


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

mehr als 12 Jahre vor

Gelöst


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

mehr als 12 Jahre vor

Gelöst


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

mehr als 12 Jahre vor

Gelöst


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

mehr als 12 Jahre vor

Gelöst


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

mehr als 12 Jahre vor

Beantwortet
what does this simulink command mean ?
* [0 100] is the time span, * [] - here you can put a option structure, which can modify simulation settings. You can change si...

mehr als 12 Jahre vor | 1

Beantwortet
reading files and data into matlab
Enter to subfolders: *<http://www.mathworks.com/help/matlab/ref/cd.html cd>* Exit from subfolders *cd ..* Read files: *<ht...

mehr als 12 Jahre vor | 0

Beantwortet
How can I output intermediate vaviables when using ode45 funcion?
You can use *OutputFcn* to do this. Just add options to ode45 in this way: options = odeset('OutputFcn',@myfun); [T,Y]=o...

mehr als 12 Jahre vor | 0

| akzeptiert

Gelöst


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

fast 13 Jahre vor

Gelöst


Related Vectors
I have two vectors A & B. If the values in vector A is zero then the corresponding value in vector B should be zero. Example:...

fast 13 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

fast 13 Jahre vor

Gelöst


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

fast 13 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 13 Jahre vor

Gelöst


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

fast 13 Jahre vor

Gelöst


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

fast 13 Jahre vor

Gelöst


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

fast 13 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 13 Jahre vor

Gelöst


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

fast 13 Jahre vor

Gelöst


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

fast 13 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 13 Jahre vor

Gelöst


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

fast 13 Jahre vor

Gelöst


frame of the matrix
Given the matrix M, return M without the external frame.

fast 13 Jahre vor

Gelöst


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

fast 13 Jahre vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

fast 13 Jahre vor

Mehr laden