Community Profile

photo

Ken Campbell


72 total contributions since 2006

http://www.campbellmusclelab.org

Professional Interests: Time series analysis, Stochastic modeling, Image analysis, Differential equations, Data acquisition, Controlling experimental apparatus

Contact

Ken Campbell's Badges

Contributions in
View by

Question


Is there an efficient method to remove leading underscores from a cell array of strings?
Given a={'rose','_tulip_blue','lilac','_daisy'} is there an efficient way of stripping the leading underscores to give ...

2 years ago | 2 Answers | 0

2

answers

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

4 years ago

Solved


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

4 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

4 years ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

5 years ago

Solved


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

5 years ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

5 years ago

Solved


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

5 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

5 years ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

5 years ago

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

5 years ago

Solved


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

5 years ago

Solved


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

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

5 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

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

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

5 years ago

Responded


Re: PDFs on the Mac look interpolated--why?
I don't know if this will help with your specific question, but have you tried export_fig? It's simplified a lot of the issues I...

5 years ago | 6453 views

Posted


Using the system command to launch a multi-threaded PC executable
I have a Windows executable file that runs stochastic simulations as separate threads and then averages the results together at ...

5 years ago | 1271 views

Responded


Re: Tracking of contours in noisy ultrasound image
Loram and Lakie have a paper in the Journal of Applied Physiology about analyzing ultrasound movies. I don't have the citation t...

6 years ago | 3534 views

Responded


Re: How to vectorize this?
Brilliant - thanks. I didn't know / perhaps had forgotten? that syntax. Ken

6 years ago | 1407 views

Posted


How to vectorize this?
Can anyone suggest a way of vectorizing this? a=rand(4,1); for ii=1:4 end Thanks in advance, Ken

6 years ago | 1407 views

Responded


Re: How can I find a slope of a line in a image with Mathlab
Other people will have better ways (if they answer) but a simple way of doing this might be: 1) Read in the image (doc imread) ...

7 years ago | 11185 views

Responded


Re: symmetric matrix
I'm a little surprised that there isn't a MATLAB built-in function "issymmetric". There seem to be at least 50 other is-somethin...

7 years ago | 45599 views

Responded


Re: symmetric matrix
I'm a little surprised that there isn't a MATLAB built-in function "issymmetric". There seem to be at least 50 other is-somethin...

7 years ago | 45599 views

Responded


Re: MCRinstaller download page request
Richard Crozier" <r.crozier@ed.ac.uk> wrote in message > <snip> This seems like a great idea to me too. It would be really g...

7 years ago | 16252 views

Responded


Re: MATLAB on GPUs
I'm interested in the general idea of using GPUs to speed up calculations but I didn't immediately think of using Matlab as a 'c...

7 years ago | 16970 views

Responded


Re: MMPOLAR Update
It would appear that you can (or at least could several years ago) register the toolbox ($30) to see the source. See this link. ...

8 years ago | 13000 views

Responded


Re: fminsearch, parallel computing
You might also want to look into particle swarm optimization. It is easy to run this in parallel because the function evaluation...

8 years ago | 6520 views

Responded


Re: Mex with LAPACK/BLAS: "The specified procedure could not be found"
I got out of my depth with a similar situation a year or so back. My recollection is that I got my executable code to work by ma...

8 years ago | 3653 views

Load more