Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

13 years ago

Answered
Is it possible to update two different graphs?
Hi David, What exactly do you mean by "keep two different graphs going"? If you just mean that you want to have two graphs...

13 years ago | 2

| accepted

Answered
Reading data from a text file
Hi Bry This code should work just fine to do what you describe. It uses a regular expression at each line of the text file to...

13 years ago | 0

| accepted

Answered
plotting data with different color
data = rand(120,3) figure, hold on plot(data(:,1),'go') plot(data(:,2),'ro') plot(data(:,3),'bo') set(gca,'Colo...

13 years ago | 2

| accepted

Answered
Purpose of guidata(hObject,handles)
Every graphics "object" (a figure, an axes, a button, a textbox etc) is represented by a "handle" variable. That's the hObject. ...

13 years ago | 52

| accepted

Answered
How can one GUI write to an Edit Text box on another GUI?
"What's the magic recipe?" 1. Get a handle to the text box you want to edit. 2. Call: set(myHandle,'String','My New S...

13 years ago | 2

Answered
How can I query data?
Hi Tan, let's take this one step at a time. *STEP 1: Load your data from excel and into MATLAB* allData = xlsread('c:/yo...

13 years ago | 1

| accepted

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

13 years ago

Solved


2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

13 years ago

Solved


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

13 years ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

13 years ago

Solved


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

13 years ago

Answered
creating a figure that is a segment of another
I see a few problems: Your *f* variable is still based on the original vector of *t*. You need to run: f = 53*cos(104*pi...

13 years ago | 0

| accepted

Answered
Why does MATLAB give an error on an axes plot when I change with new variable (a22) in my formula??
Hi Sven (nice name, btw) Replace the one line: axis([qstart qstop min(a22) max(a22)]); With the two lines: dis...

13 years ago | 1

| accepted

Answered
Correctly wrap data for spherical interpolation.
Justin, You're in luck - I've had the exact same problem and worked reasonably hard to get an acceptable solution. See the co...

13 years ago | 1

| accepted

Solved


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

13 years ago

Solved


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

13 years ago

Solved


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

13 years ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

13 years ago

Solved


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

13 years ago

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

13 years ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

13 years ago

Solved


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

13 years ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

13 years ago

Solved


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

13 years ago

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

13 years ago

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

13 years ago

Solved


surface of a spherical planet
you just discovered its circumference, that is the input.

13 years ago

Solved


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

13 years ago

Answered
2D graph + Colour. With meshed grid of variables X and Y
Hi Laura, try this: % Make your data (you've probably got your own X,Y,Z) [X,Y,Z] = peaks; % Show your data figu...

13 years ago | 0

Load more