Answered
why is my plot not showing anything
try k = 8.9870e+009; q1 = .000000024820; q2 = .000005200901; r = [.10,.15,.20,.25,.30,.40]; ...

13 years ago | 2

Answered
store the output of a for loop in an array
try F= @(x) (cos(x))./sqrt(1+sin(x)); count=1; for n=0:0.1:pi/2 q (count)= quad(F,0,n); count=count+1; ...

13 years ago | 0

Answered
Max peak between two points using ginput
I dont know if this is what you are looking for? c=rand(1,10) % generate some random data plot(c) % plot the...

13 years ago | 0

Answered
arranging a matrix
Perhaps you need something like this.. c=[]; for ii=1:120 a=rand(2,7); %generate 2x7 matrix every loop c=[c;a]; ...

13 years ago | 0

Answered
GPU and SSH
Quadro 4000 has a compute capability of 2.0 which is more than enough for MATLAB. Your CUDA drivers do not seem to have loade...

13 years ago | 3

Answered
writing data to a file
Hmm.. I am unable to reproduce your circumstance.. d=262206552555 fid = fopen('new1.txt', 'w'); fprintf(fid,'%d\n',d)...

13 years ago | 0

Answered
getAllOutputArguments only returns one result per node, not per core
I just checked my parallelSubmitFcn file for our SGE cluster. We keep procsPerNode = 1; SGE has a different way of...

13 years ago | 0

Answered
Textscan
try fid1=fopen('input.dat','r'); C=textscan(fid1,'%s'); fclose(fid1); %Edit out=cell2mat(C{1}) % this is ...

13 years ago | 0

| accepted

Answered
want source code.
Here is Alan Hwang's profile on file exchange. <http://www.mathworks.com/matlabcentral/fileexchange/authors/31143> I'm not s...

13 years ago | 0

Answered
How to Save Matrices to excel multiple times with incremental excel name to avoid overwrite
Cant test this right now, but you could try.. for ii=1:3, C = rand(1,10); % some random data fname=strca...

13 years ago | 2

Answered
How to find the two nearest values related to a constant
a=[1250 2320 3520 4650 5550 6760]; b= 3700; % this will work even if 'a' is in random order d=sort(abs(b-a)); ...

13 years ago | 4

| accepted

Answered
colors of barh
Unfortunately that is not how barh works. You can find more documentation on barh usign doc barh % v=[1,2,3;2,2...

13 years ago | 0

Answered
Having problems with saving vectors in a loop
This video should help: <http://blogs.mathworks.com/videos/2007/08/20/matlab-basics-video/> Eg> for jj = 1:500 ...

13 years ago | 0

Answered
plotyy and legend display
If you are calling the legend like this now.. [AX,H1,H2] = plotyy(x,y1,x,y2,'plot','plot'); legend(H1,'y1'); legend(H...

13 years ago | 0

Answered
Regarding LEACH protocol
<http://www.mathworks.com/matlabcentral/fileexchange/25853-wireless-networks> Leach implementation

13 years ago | 0

Answered
Capturing Mouse click on a Figure
Dunno if this will help y=0 % intial value of y==0 k=waitforbuttonpress; % detect mouse click if k==0 % ...

13 years ago | 0

| accepted

Answered
Filter Butterworth
It will depend on what you are trying to do (low pass, highpass, band pass, band stop) You have Ws hence your Wp will change ...

13 years ago | 0

| accepted

Answered
estimation, equalization and detection
Not sure what this has to do with MATLAB.. but here goes after a short goggle search: Estiamtion: <cache.freescale.com/file...

13 years ago | 0

Answered
imshow
You could use something like the following: <http://www.mathworks.com/matlabcentral/fileexchange/7900-movie-from-a-sequence-o...

13 years ago | 0

Answered
Wireless sensor networks
You might be better off deciding on one (or at the most two) routing protocols for wireless sensor networks.. LEACH is a good al...

13 years ago | 1

| accepted

Answered
storing binary data as .txt file and as binary data
You could also try % this will show the pretty output formatted file.. x=[1:1:100]; y=dec2bin(x,8); new=cellstr(...

13 years ago | 1

Answered
Finding the n'th element satisfying a condition
Seems to be the fastest way of doing this.. Index might make it faster (though I doubt it..) try timing it..

13 years ago | 0

Answered
switch statement help
try clear variables disp('1 for CH4');disp('2 for CO2');disp('3 for N2'); nc =input('components: '); if nc > 5 ...

13 years ago | 0

Answered
how to find the variance of each row in a matrix?
out=var(X,0,2)

13 years ago | 1

Answered
Count the number of non-zero elements of a column/row of a 2D-Matrix?
Try: a=[3 0 0;0 2 0; 1 0 4] %input matrix sum(a~=0,2) % no. of nozero elements in each row

13 years ago | 12

Answered
plotyy and a third plot
The reason your colors of the axis and your plot and legends dont go together is because you are changing the default color of t...

13 years ago | 0

Answered
How to use Semilogy in MATLAB
try saving A as a vector and move the plotting outside. for n=1:10, % loops from 1 to 10 n A(n)=cond(n); % give...

13 years ago | 1

Answered
Error Message: ??? Undefined function or method 'SimpleSurround' for input arguments of type 'char'.
You have named your function call 'SimpleSurrond' and not 'SimpleSurround'.. function SimpleSurrond( filename, OUTfile ) ...

13 years ago | 2

| accepted

Answered
TUTORIAL: how to ask a question (on Answers) and get a fast answer
Maybe this post should be a 'sticky' post at the top of the answers forum..

13 years ago | 0

Answered
Jetty Problem
You have not defined 'n' anywhere in your code... what is 'n'? *EDIT* based on the comment hat n=number of steps Change...

13 years ago | 0

Load more