Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

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

12 years ago | 1

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

12 years ago | 0

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

12 years ago | 0

| accepted

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


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

12 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

12 years ago

Load more