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

casi 14 años hace | 2

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 3

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 2

Respondida
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)); ...

casi 14 años hace | 4

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 1

| aceptada

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

casi 14 años hace | 1

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

casi 14 años hace | 0

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

casi 14 años hace | 0

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

casi 14 años hace | 1

Respondida
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

casi 14 años hace | 12

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

casi 14 años hace | 0

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

casi 14 años hace | 1

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

casi 14 años hace | 2

| aceptada

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

casi 14 años hace | 0

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

casi 14 años hace | 0

Cargar más