Recent Posts

Pages: [1] 2 3 4 ... 10
1
Matlab Programming / SSOR code in matlab
« Last post by matl on February 03, 2012, 07:46:41 PM »
I am stuck with ssor's code. i have the following algorithm:
Enter a matrix A;
choose an initial guess x0, a maximum number of iterations N, a value for ! 2 (0; 2), and a tolerance
Tol;
_nd D, representing the diagonal, L, strictly lower triangular, and U, strictly upper triangular parts
of A;
_nd the inverse of the upper triangular matrix (D + ! U);
_nd the inverse of the lower triangular matrix (D + ! L);
set T1 = [D + ! U]1 [! L + (1 ! )D];
set T2 = [D + ! L]1 [! U + (1 ! )D];
set T = T1T2;
set c = ! (2 ! ) [D + ! U]1 [D + ! L]1 b;
set k = 0;
while k _ N;
set x(k+1) = T x(k) + c;
if jjx(k+1) x(k)jj1 _ Tol, then k = N + 1;
end;
Display x(k+1).
 
can someone show me how to code this please. thanks
2
hey guys I found out where my mistake lies. imread stores data in an 8-bit format by default (i think  :P ). Values manipulated using the equations I stated above would lead to negative values for SA and SB. So I converted de matrix from uint8 to double. Yipee it worked  :) :) :) :)
3
Graphics & Image Processing / Watermarking of Images-a different perspective required
« Last post by pulse.asr on February 01, 2012, 08:45:13 PM »
I am working on an project on digital watermarking and am implementing an algorithm where de input img is mixed with de matermark img at de source to give 2 shadows.....at de destination de the 2 shadows are to re-permuted to get back de original img and the watermark img...de code is as follows


I=imread('monkey.gif');
L=imread('lenna.bmp');


SA=mod((5*I+4*L),256);
SB=mod((4*I+5*L),256);
In=mod((285*SA-228*SB),256);
Ln=mod((285*SB-228*SA),256);


the code works perfectly for smaller matrices (say 2x2) but when i use images, the variables 'In and Ln' always have zeros....I am using 512x512 images...anybody got a clue ?
4
Matlab Code Examples / DTC of Permanent Magnet Synchronous Motor
« Last post by sakthiraj444 on January 31, 2012, 08:25:54 AM »
Hello Geniuses around here i am Sakthi raj doing my project work on comparitive study of direct torque control of Permanent Magnet Synchronous Motor and Induction Motor.In first phase i completed the INDUCTION MOTOR Simulative work but LAGGING IN PMSM Simulation can anyone guide me through this Simple work any genius around here :)
5
Graphics & Image Processing / Seeking Aid: Segmentation, Processing etc
« Last post by poken1151 on January 22, 2012, 08:47:52 AM »
Hello All,


I am seeking aid in a small project of mine. I want to identify some text in a small image, the text is located in a circular object. I have processed the image to pull out the edge of the circular region. So the steps I want to do are as such:


Process Image until a circular contour is in it.
Identify (ie. automatically draw a box around) the complete circular contours.
Then, from that selection, use it to extrude that particular section from the original image.


I am at the first step in my endeavor, and am seeking help to automatically select the region soley enclosed by the circular lines in the binary image.


I was wondering if someone could point me to some small tutorials or guides that may help me to figure out how to accomplish these automatic things. Or if possible, how to do one or two of these things.  I appreciate any and all aid, if I need to be more clear on a particular point, please let me know.
6
Matlab Programming / university project
« Last post by klevieter on January 21, 2012, 12:25:16 AM »
Hi everyone,

In order to finish a course at my university I have to build some project in matlab, but I am a little bit stuck.

I was wandering if anyone could help me

I have attached the files that are needed
The idea is that one can select an element then press done and then the selected element will be returned

but the variable that stores the chosen elements gets lost or something I don't get it.
The M in line 155 should be the output of the entire function

I am really hoping anyone can help me because I am at my end.

regards
7
Matlab Programming / [help] how load variable .xlsx file name in matlab?
« Last post by ashkan.nm on January 13, 2012, 02:24:55 PM »
Hello
 i have a lot of Excel files and i need put all of these files in one Excel file
 i want use function xlsread('filename')
 the filenames are
 u 0.1 - u 0.2 - u 0.3 andd ....
 i want write a code that read first file from folder and put the array in on matrix and the read next file in a Loop
 i write a code like below
 --------
 j=0.1
 for i=1:10
 str=num2str(j);
 [num,titl,sub]=xlsread('u str')
 j=j+0.1;
 A(:,i)=num;
 end
 ---------
8
Matlab Programming / [Help] shortest path in matlab
« Last post by Jake on January 11, 2012, 10:47:35 PM »
i need a way to calculate the shortest path in matlab for 9 vectors inside a matrix 2X9,
please make it short as possible

9
Matlab Programming / Help with arma(q,p)
« Last post by Loukas on December 31, 2011, 12:40:25 AM »
Hi all,

I am new in matlab and I am trying to create a simple ARMA(q,p) model which will predict a value 1 day ahead. I have a stock daily prices(QQQ) and my code is below.

pr=price2ret(QQQ);
model=armax(pr(1:end-150),[1 2]);
y = predict(model,pr);
plot(pr(151:end),y(151:end));

If I run this code it will give me a idpoly model(model) and a double (1x1 cell) for y variable with an Error
??? Error using ==> plot
Conversion to double from cell is not possible.

I will really appreciate if someone could assist me on this error and give me an insight how can I compile this error in order to be able to plot a chart with y or to compare the model with the actual report

I had tried to use the compare function but it is also give me an error.

There is a very similar example at mathworks in the following link:

http://www.mathworks.co.uk/help/toolbox/ident/ref/predict.html (http://www.mathworks.co.uk/help/toolbox/ident/ref/predict.html)

Thanks in advance
10
Signal Processing / Hepl CELP
« Last post by hoangnv2512 on December 23, 2011, 06:48:03 PM »
I downloaded code matlab but when I run, It's error.
Hepl me!
http://www.mediafire.com/?71zb1e4395b1pdi
Thanks you so much

Pages: [1] 2 3 4 ... 10