Community Profile

# John

70 total contributions since 2010

#### John's Badges

Contributions in
View by

Answered
How to delete the row from cell array?
You can index out the rows like any standard array (the following code removes the second row): x = {1 2 3; 4 5 6; 7 8 9} ...

3 years ago | 1

Answered
Loading a excel file in which I want to take only B, D not C , how can it be done?
The best way to do this is call xlsread() once (read in all the data) and index the data you need: data = xlsread('t...

3 years ago | 1

| accepted

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

4 years ago

Solved

Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

4 years ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

4 years ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

4 years ago

Solved

Add two numbers
Given a and b, return the sum a+b in c.

4 years ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

4 years ago

Answered
Executing two callbacks concurrently
I don't particularly care for this solution but it is one quick way to get at what you're trying to do (I think), hope it helps!...

4 years ago | 0

Answered
Help removing columns from csv file
If you want to load in the data and pull out the third and fourth columns (just as an example) I'd do the following: [num txt...

5 years ago | 0

| accepted

Answered
How do I generate n cubes to define a sphere?
To create the cubes and visualize them I would start with something like the following: <http://www.mathworks.com/matlabcentr...

5 years ago | 1

| accepted

Answered
writing 1*5 char in one cell in excel
Perhaps the following would work: xlswrite('test.xls', cellstr(x)) Where "x" is a character array

5 years ago | 0

Answered
MATLAB runtime
i would look at the help for 'waitbar' if you want some kind of indication of where the program is. in addition if you are using...

5 years ago | 1

Answered
How do I get system idle time in MATLAB?
Found this perl script that works, simply call perl('last-input.pl') in matlab use Win32::OLE; use Win32::API; ...

6 years ago | 0

| accepted

Question

How do I get system idle time in MATLAB?
How do I go about getting the system idle time in MATLAB, I've searched around and cant find anything. Im using Windows XP x64. ...

6 years ago | 1 Answers | 0

### 1

answer

Answered
connecting mysql database to matlab
Perhaps you need something like this: <http://www.mathworks.com/products/database/ MATLAB Database Toolbox>

6 years ago | 0

| accepted

Answered
Creating M-file using Excel/Visual Basic
Do you have to use visual basic? In MATLAB you can use xlsread to load in the excel file and then save the loaded data into .mat...

6 years ago | 1

| accepted

Answered
Determining whether a point on earth (given latitude and longitude) is on land or ocean
Perhaps something like this could help: <http://www.mathworks.com/products/matlab/demos.html?file=/products/demos/shipping/ma...

6 years ago | 0

Responded

Re: SSA
can you be more specific as to what you need, and what your purpose is

6 years ago | 1996 views

Responded

Re: Planetary Orbit Model
I made some modifications, most specifically i added real values for the mass of the earth and the sun and the gravitational con...

6 years ago | 14170 views

Responded

Re: Planetary Orbit Model
And what are your time units, seconds?

6 years ago | 14170 views

Responded

Re: Planetary Orbit Model
How long is it taking you to run this? You have 1.7 million time steps and are running this through a loop, is there a reason th...

6 years ago | 14170 views

Responded

Re: Densely packed spheres
Are the spheres randomly spaced? You can probably just use the 'sphere' function which will return the position of the sphere it...

6 years ago | 4924 views

Responded

Re: Detecting if a variable is defined
I am not really understanding what the difference between a variable not being defined and not existing. If by not being defined...

6 years ago | 26246 views

Responded

Re: problem with code
It didnt error when I ran it, which line did the error occur on and which version of MATLAB are you using John

6 years ago | 1193 views

Responded

Re: save new variables into input file
Try this: ke=[ke sum(ke,2) diff(ke,2,2)]

6 years ago | 2085 views

Responded

Re: save new variables into input file
assuming that your starting matrix is called 'ke' then I would do the following ke = [ke sum(ke,2)]; save ke John

6 years ago | 2085 views

Responded

Re: How to add a scrollable panel to my GUI?
uicontrol' is not a property of a uicontrol, if you want to set the text inside of an editable text box use the 'string' propert...

6 years ago | 5466 views

Responded

Re: Set icon for GUI figure
The one time I did this, I had to turn off the warning: % Set the figure icon warning('off','MATLAB:HandleGraphics:ObsoletedPro...

6 years ago | 3674 views

Responded

Re: need GUI suggestion how to connect a list to a graph
yes, using set would be the correct way to update a uicontrol such as that, if you have any questions dont hesitate to ask! Joh...

6 years ago | 2069 views

Load more