Answered
How to export .fig file automatically into another format without being pixelated?
This might help: http://de.mathworks.com/matlabcentral/fileexchange/37640-export-figure-to-3d-interactive-pdf

9 years ago | 0

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

9 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

9 years ago

Solved


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

9 years ago

Solved


Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

9 years ago

Answered
How to Change the brightness of an image by using loops and no loops
What error message are you getting? You should change your code to the following: function [ outimg ] = makebright_L...

9 years ago | 0

Answered
Unable to calculate the second derivative of a function
change th = sym('th(t)'); %th is a time dependent variable to th = sym('th'); %th is a time dependent variable ...

9 years ago | 0

Answered
difference between mean2 and mean
That's strange. According to your code, there shouldn't be a different output (if A is of type double). It may be a different ou...

9 years ago | 0

Answered
How to manually enter the length of axis tick marks?
Setting the TickLength changes the length of the tick markers, not the distance between them. Try set(gca,'TickLength'...

9 years ago | 3

Answered
Hello, everyone, i have the following problem
I assume your date_num values are datenums? How about something like: wd = weekday(date_num + i); if wd == 1 i ...

9 years ago | 0

| accepted

Submitted


duplicateFuncs()
searches the matlab path for m files that have the same name

9 years ago | 2 downloads |

5.0 / 5

Answered
error " Unexpected matlab expression workspacefunc 329"
It probably means you have a function somewhere that "shadows" a built in Matlab function, i.e. that has the same name as a buil...

9 years ago | 3

| accepted

Solved


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

9 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

9 years ago

Solved


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

9 years ago

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

9 years ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

9 years ago

Solved


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

9 years ago

Solved


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

9 years ago

Solved


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

9 years ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

9 years ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

9 years ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

9 years ago

Solved


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

9 years ago

Solved


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

9 years ago

Answered
How can I plot Latitude and Longitude in a map, color depending on a certain value
Maybe contour() would work better instead of plotting in a loop.

9 years ago | 0

Answered
Output argument "rmax" (and maybe others) not assigned during call to "bestdesign".
You should initialize rmax and hmax at the beginning of your function. If r is greater than stop, hmax is never defined and if...

9 years ago | 0

Solved


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

9 years ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

9 years ago

Solved


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

9 years ago

Load more