First
|
Prev |
Next
|
Last
Pages: 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
How to avoid nested for loops Hi, I am trying to avoid for loops but I couldn't find an easy solution for the problem below: p1hf = [1,2;3,4]; nb = 2; % It might go up to 100 or so need a smarter solution p2hf = zeros(nb, nb, nb, nb); for a=1:nb for b=1:nb for c=1:nb for d=1:nb p2hf(a,b,c,d) = 2*p1hf(a,b)*... 7 Jul 2010 21:11
programming an enter in matlab... Hi all, I'm writing a matlab script that creates a text file and then calls and external .bat file to execute this text file. In the end of the process, I need to press the enter key to continue. My problem is that all this is inside a very big for loop, and I would like to skip the click the enter button every int... 4 Jul 2010 14:27
loadlibrary - function not found Hi, I'm trying to access a DLL from MATLAB but I receive the errors: Warning: The function 'maintDLL' was not found in the library. Warning: No functions found in library. (maintDLL is the only function in the DLL). The MATLAB syntax I'm using to load the library is: [notfound warnings] = loadlibrary('libm... 2 Jul 2010 22:19
error: Subscripted assignment dimension mismatch. function s_path = KShortestLink(G,k,u,v) NoN = size(G,1);%no of nodes in graph NoN s_path= zeros(k,NoN); for p = 1:k [dist, path]= graphshortestpath(G, u, v); if (dist~=inf) n = size(path); s_path(p,1:n)= path; for i = 1:n-1 G(path(i),path(i+1))=0; G(path(i+1),pa... 1 Jul 2010 20:04
Quotations Hi everybody, Is there a way to get around the ' in matlab? Best to show an example: dir='C:\filefolder\filename_1'_comments.txt'; Can I leave that ' after the 1 or is it necessary to take it out? If so, how? Thanks.... ... 1 Jul 2010 18:56
problem with simulink .MAT file Hi All, I am using Matlab Simulink for my project. I am trying to give the input from a file. But my file is in text format and the block for the input file takes only .MAT format. How do i create the .MAT format file? Please help me guyz... Thank you ... 1 Jul 2010 21:09
GUI Table: Indicate what is selected. Howdy! I have decided that using a table (as opposed to a list which I know would "solve" my problem) in order to display some information. The table is 21x2 and contains all strings. I would like to call out the HIGHLIGHTED SELECTION on the table...not the data in the table. There is no value set on the selec... 2 Jul 2010 07:59
Replacing a NaN by it nanmean "Joerg Buchholz" <buchholz(a)hs-bremen.de> wrote in message <i0hee7$q81$1(a)fred.mathworks.com>... I'm sure a Matlab expert could do that in one line of code ... ;-) It took me a while, but here is a one-liner ... ;-) % data A = [NaN 0 3;7 2 6;5 1 2;NaN NaN 5] % code [B, B(~isnan(A))] = deal(repmat(nanm... 1 Jul 2010 17:48
??? Undefined function or variable "sm_". I've used the curve fitting GUI tool to setup some data, smooting and fitting options. Then, I've generated a M-File by using the option in the menu File of this tool. It generated a file that contain this piece of code below. When I try to using this function in any data, includig the one used to setup the data in th... 2 Jul 2010 00:25
removing some egdes from graph.G . And after remoiving edges it shuold be k-connected i have a graph G with 25 nodes, 2 nodes are connected only if their transmission range is greater then the distance between nodes. I sort all the edges in order to there weights. Assume this graph is a K-connected(K=2). Now i want to remove some nodes and want to see that is still k-coonected or not. i m getting the pr... 1 Jul 2010 16:41 |