|
I have a long running function in MATLAB that I tried to speed up by adding caching and wound up slowing down my performance significantly. My code is basically searching for continuous "horizontal" lines in an edge detected image and the original code...
Started by Jon Norton on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The following work:
lineLengths = max(cumsum(img~=0, 1), 1)
If you're trying to extract blobs from your.
|
|
On Thu, 23 Apr 2009 18:56:01 +0000 (UTC), "ashish " <ashishtx@hotmail.com
hi, I am a very new matlab user.
Below is my function now how do i get it to give me two component vector.
function move1=move_that_bug(n,m,ibug,jbug,imove,jmove)
while...
Started by ashish on
, 10 posts
by 3 people.
Answer Snippets (Read the full thread at omgili):
So far this is my work
%task 1
clc,clear,close
all
a=load('zzp5data.txt');
nrows=a(1,1);
fprintf('the number of rows of tiles ....
I am stuck on task 3 but i am not sure if my result for task 2 gave me correct result.
With rules.
|
|
Hi, I'm trying to calculate the inverse matrix in Java.
I'm following the adjoint method (first calculation of the adjoint matrix, then transpose this matrix and finally, multiply it for the inverse of the value of the determinant).
It works when the ...
Started by dedalo on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
}}; // each array is a row in the matrix double [] rhs = { 9, 1, 0 }; // rhs vector double [] answer = { 1, 2 [] rhs = { 9, 1, 0 }; RealMatrix a = new Array2DRowRealMatrix(values); System.out.println("a matrix.
|
Ask your Facebook Friends
|
On Wed, 27 May 2009 16:15:53 +0100, Jonathan Campbell <jg.campbell.ng@gmail.com
typedef unsigned char uchar; uchar c = 0x43;
cout<< c<< endl;
result: C
I would like to see the number rather than the character.
Since the offending...
Started by Jonathan Campbell on
, 5 posts
by 3 people.
Answer Snippets (Read the full thread at omgili):
() <<", "<< im.nBands() << "]{\n";
for(int r=0; r< im.nRows(); ++r){
os<<"[";
for(int c=0; c< im.nCols(); ++c){
os<<"(";
for(int b=0; b< May 2009 18:49:53 +0200, "Alf....
|
|
Is there an easy way to reference a column in a 2-D array as a separate 1-D array in plain old C (not C++ or C#)? It's easy to do this for a row. Asssume I have 2 functions:
double doSomethingWithARow( double theRow[3] ); double doSomethingWithACol( double...
Started by Keith G on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Size_t nRows) { double *c = NULL, *end = matrix + colID + (nRows * rowSize); double sum = 0; for (c *colPtr, size_t rowSize, size_t nRows) { double *end = colPtr + (nRows * rowSize); double sum = 0 nRows....
|
|
On Mon, 13 Jul 2009 15:47:16 -0400, Stewart Berman <saberman@nospam.nospam
I am working my way through various parts of the VB.NET diagnostics and error handling and ran
across a small problem. It concerns a program that sits in the tray and runs...
Started by Stewart Berman on
, 12 posts
by 2 people.
Answer Snippets (Read the full thread at omgili):
How often does this locking problem happen? Are there any patterns you can
find of when it happens?
Also, there is a very useful tool that we use... .
Hi Stewart,
I think the problem is not how to get around this error, but to find out
the root cause .
|
|
All attempts have failed. import WConio
import array
screen = array.array('H',[0]*75,[0]*24)
ERR array takes at most 2 arguments
screen = array.array('H',[0]*75[0]*24)
...
Started by pdlemper@earthlink.net on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at omgili):
NROWS = 24
NCOLS = 75
screen = array("H", [0]) * (NROWS * NCOLS)
and then you can use items like;hsgl255g4curs2aekdb0i0lra4ho5hvvrv@4ax.com
I guess you could do something like
screen = [array.array('H', [0]*75.
|
|
My Situation I have a N rectangles The rectangles all have the same shape (for example 2 inches wide x 1 inch tall) - Let's refer to this size as Sw and Sh for the width and height I want to position these rectangles in a grid such that the rects completely...
Answer Snippets (Read the full thread at stackoverflow):
You know that nRows*nCols >= N, and I think simplifying....
Your circumference is 2*nRows*Sh + 2*nCols*Sw.
In such a case you don't really) will be at its minimum .
The rectangles and the result has to be a rectangle as well? I'll assume so.
|
|
On Wed, 28 Jan 2009 07:16:36 -0800 (PST), Mash <hnmash@gmail.com
I want to create a function such that given a matrix, the result will
be a matrix whose columns are all the possible pairwise products of
the original matrix. For example if the original...
Started by Mash on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at omgili):
');
end
nrows = D(1);
ncols = D(2);
noutcols = ncols * (ncols+1)/2;
B = zeros(nrows, noutcols);
outcol = 0;
for c1 = 1:ncols-1
for c2 = c1+1:ncols
outcol = outcol + 1;
B(:,outcol) = X(:,col1) m(:,x).*m(:,y),ix(:,1),ix(:,....
|
|
(I wish I could have come up with a more descriptive title... suggest one or edit this post if you can name the type of query I'm asking about)
Database: SQL Server 2000
Sample Data (assume 500,000 rows):
Name Candy PreferenceFactor Jim Chocolate 1.0 ...
Started by Brian Gillespie on
, 12 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
I changed the query to remove, allowing conversion straight to ... .
The following result surprised me.
If you want to get the the most preferred food by user than use
select top 1 seconds and produced 200,000 rows .
Times in your result set.
|