bump

Hi there, Can anyone provide a step by step solution to the following questions - I want to learn how to solve them for myslef - but need alot of help. Thank you. Takishi 1st Question : [url=http://www.postimage.org/image.php?v=aV1aPjTJ][img]http://s4.postimage.org/1aPjTJ.jpg[/img][/url] - http://www.postimage.org/image.php?v=aV1aPjTJ 2nd Question : [url=http://www.postimage.org/image.php?v=aV1aPGl0][img]http://s4.postimage.org/1aPGl0.jpg[/img][/url] - http://www.postimage.org/image.php?v=aV1aPGl0 3rd Question : [url=http://www.postimage.org/image.php?v=aV1aPViS][img]http://s4.postimage.org/1aPViS.jpg[/img][/url] - http://www.postimage.org/image.php?v=aV1aPViS I was bored, so here's question 1. Just wondering, is this work for a college level class or high school? n = 7; if floor(n) == n else error(['The value, ', num2str(n), ' is not an integer!']) end Final = zeros(1,50); Final(1,1) = n; for a = 2:50; if num2str(Final(1, a-1)/2) == int2str(Final(a-1)/2) Final(1,a) = Final(1, a-1)/2; else Final(1,a) = 3 * Final(1, a-1) + 1; end end plot(Final) Oops, that other one didn't work for odds. This one will work for any number: n = 19; if floor(n) == n else error(['The value, ', num2str(n), ' is not an integer!']) end Final = zeros(1,50); Final(1,1) = n; for a = 2:50; if floor(Final(1, a-1)/2) == Final(a-1)/2 Final(1,a) = Final(1, a-1)/2; else Final(1,a) = 3 * Final(1, a-1) + 1; end end plot(Final) ...

I have a 32 x 1300 2D array, lets call it S. I know I can pick off a particular row with the following argument: A = S(1,:); which gives me a 1 x 1300 array from the first row of the 2D array. I want every row assigned to a new indexed array, so I would start off with for n = 1:rows A(n) = S(n,:); end This doesn't work because of a dimensional mismatch. I'm not really trying to define a dimension but simply declare a unique identifier. How am I able to assign rows such that I can put them in A(1), A(2), etc., all with the dimension 1 x 1300. Thanks! On Nov 16, 3:46=A0pm, "James Carter" <jim...@msn.com> wrote: > I have a 32 x 1300 2D array, lets call it S. =A0I know I can pick off a p= articular row with the following argument: A =3D S(1,:); which gives me a 1= x 1300 array from the first > row of the 2D array. =A0I want every row assigned to a new indexed array,= so I would start off with > > for n =3D 1:rows > A(n) =3D S(n,:); > end > > This doesn't work because of a dimensional mismatch. =A0 I'm not really t= rying to define > a dimension but simply declare a unique identifier. =A0 How am I able to = assign rows > such that I can put them in A(1), A(2), etc., all with the dimension 1 x = 1300. =A0 > > Thanks! So essentially you want A to be a 32x1 vector? You're trying to access single elements of A, yet you're trying to put a 1x1300 length vector into that single element. You wou...

Is there a way to filer a black and white image so that all holes with a defined pixel area (say, less that 5 pixels) will be filled? Hi Tyler, this reminds me to a function 'imfill' in the image processing toolbox. Also a dilation (imdilate) and afterwards an erosion (imerode) should do the working. Both together is known as closing. Hope this helped? Regards, Stefan ---------------------------------------- Tyler <tylerh@mail.utexas.edu> writes: > Is there a way to filer a black and white image so that all holes > with a defined pixel area (say, less that 5 pixels) will be filled? If you have the Image Processing Toolbox, try the bwareaopen function. -- Steve Eddins Development Manager, Image Processing Group The MathWorks, Inc. Tyler wrote: > Is there a way to filer a black and white image so that all holes > with a defined pixel area (say, less that 5 pixels) will be filled? These functions might be helpful: help bwlabel help regionpros -Herbert ...

Hi, I have recently started using MATLAB for a DSP and a Communication Theory class. I have some questions about how MATLAB does some things. 1. To plot a graph, say a sinusoid, I always do this: t=0:.1:10; a=sin(t); plot(t,a) What does MATLAB do to generate the data for the points that are not in increments of .1? for example sin(1.13)? Does it interpolate to generate the graph? Is this sinusoid only valid for .1 increments? In fact, a function in MATLAB is inherently discrete, but we use it to model continuous functions (its 'domain' is actually only 101 samples)? 2. I'm having trouble mixing up the indices of the array (1..101 for t matrix) and the actual values (t(1)=0 t(1)=0.1, etc.)I am doing a lot of shifting of functions (such as f(x) = x -> f(x-2) = x-2) and this is messing me up, I usually get the error, "indices must be positive or logicals.." Mathematically, it makes sense to compute f(x(1)-2) for x(1)=1, but it doesn't make sense in MATLAB to ask for f(-1). This brings me to the question of what is a reasonable matrix size for x. -100:.1:100 ? Does it depend on the precision you need? Is there a 'convention' used to model functions? 3. I had a misconception that MATLAB was very close to mathematical notation. In fact, you have to interpret a lot when using it, often going back to the theory to make sure computations make sense. So am I using it the 'right' way. Usually only crunching huge amounts of numbers? I know...

Hi, My name's Allan and I'm a senior engineering student at the George Washington University. For my design project, I would like to create a GUI in MATLAB that would allow me to interface with a BASIC Stamp microcontroller to control a set of stepper motors. I have already created a GUI in MATLAB for another part of my project. Basically, I want to be able to control the number of steps and direction for each stepper motor using MATLAB. I have already written some code using the BASIC Stamp Editor to control the motors but those commands are static from my understanding. I want to be able to read in, either automatically or manually, step information from my MATLAB program that I have already written. Is this possible and if so, how can this be done? Thank you. "Allan Guan" <agsilver88@gmail.com> wrote in message <hnpfg3$dtt$1@fred.mathworks.com>... > Hi, > > My name's Allan and I'm a senior engineering student at the George Washington University. For my design project, I would like to create a GUI in MATLAB that would allow me to interface with a BASIC Stamp microcontroller to control a set of stepper motors. I have already created a GUI in MATLAB for another part of my project. Basically, I want to be able to control the number of steps and direction for each stepper motor using MATLAB. I have already written some code using the BASIC Stamp Editor to control the motors but those commands are static from my understanding...

Hey all, I am having problem in soft handover implementation with MATLAB please help me out. It is my final dissertation .I am unable to do this. ..pls mail me at nikhilpatel0786@gmail.com Thank you very much... Please helpp "vpmp patel" <mecs@yahoogoups.com> wrote in message news:jkh46d$i9m$1@newscl01ah.mathworks.com... > Hey all, > I am having problem in soft handover implementation with MATLAB > please help me out. It is my final dissertation .I am unable to do > this. Then you need to talk to your dissertation advisor first; if he or she can't give you enough help, post SPECIFIC DETAILS about the problem you're experiencing with your implementation and ask a SPECIFIC question and someone may be able to offer some suggestions. -- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com ...

Dear all, I need to write a small program which to test whether a line (position vector) does strictly clockwise or CCLW movement. I tried to use atand to find the angle, but it could jump from negative to positive value when it pass thought 90 deg, it will have the same thing if I use slope method. However, the motion does not have to cut at 90 deg, it could jump from 89 to 91. Then a big slope jump could happen. Any idea please Thanks ...

Hello all=EF=BC=9A I have written a matlab curve fitting program=EF=BC=9A clc clear xx =3D 1:1:20; xx =3D xx'; yy =3D exp(xx); hold on; plot(xx,yy,'o'); start =3D [1 1 1]; s =3D fitoptions('Method','NonlinearLeastSquares',... 'Lower',[-Inf,-Inf,-Inf],... 'Upper',[Inf,Inf,Inf],... 'Startpoint',start); f =3D fittype('a*x^b+c','options',s); [coe,gof] =3D fit(xx,yy,f); coe gof plot(coe,'r'); grid on; the fitting result is not satisfied=EF=BC=9A General model: coe(x) =3D a*x^b+c Coefficients (with 95% confidence bounds): a =3D 2.035 (-6885, 6889) b =3D 4.595 (-1139, 1148) c =3D 1.006 (-8.515e+07, 8.515e+07) gof =3D sse: 2.6959e+17 rsquare: -0.1105 dfe: 17 adjrsquare: -0.2411 rmse: 1.2593e+08 Then I use the curve fitting tool in matlab toolbox to fit the same array. The result is just fine: General model Power2: f(x) =3D a*x^b+c Coefficients (with 95% confidence bounds): a =3D 5.2e-17 (1.568e-17, 8.832e-17) b =3D 19.19 (18.96, 19.43) c =3D 0 (-6.271e+05, 6.271e+05) Goodness of fit: SSE: 2.398e+13 R-square: 0.9999 Adjusted R-square: 0.9999 RMSE: 1.188e+06 I guss the problem comes from the StartPoint setting, because when I set the StartPoint as [5.2e-17 19.19 0], my program can also get a fine result. Here are the source code generated by matla...

Hi All, I recently started a summer job, and was hoping that someone on this forum could provide me with a little assistance. I've used MATLAB in the past in a numerical analysis class, but do not have all that much experience yet. I have a data set consisting of around 50 text (.txt) files. Each text files contains multiple matrices. An example of how one of these matrices is formatted follows: "Gazepoint Trace Data File, 09:46:08 03/05/2002 22 Scene Type: text 1024 768 C:\Eyegaze\penguin.txt Raw Gazepoint Data (60 Hz Sampling Rate): samp Eye Gazepoint Pupil Eyeball-Position Focus Fix indx Found X Y Diam X Y Z Range Indx (t/f) (pix) (pix) (mm) (mm) (mm) (mm) (mm) 0 1 628 332 3.46 -20.5 -2.0 15.1 585.0 0 1 1 635 338 3.47 -20.6 -2.0 14.1 585.0 0 (a couple thousand lines of data like this...) Fixation Data: (60 Hz Sampling Rate) fix Fixation Sac Fix Fix indx X Y Dur Dur Start (pix) (pix) (cnt) (cnt) Samp 0 644 343 0 11 0 1 640 347 7 8 18 2 474 235 203 16 229 (a couple hundred lines like this...)" I would like to write an m-file (or do whatever I need to do) to import both matrices rom each of the fifty text files. into my workspace so that I can run machine learning algorithms on them. I have tried to look at the documentation for importing .txt data files...

Hello, I have this questions for you. I hope some one can help me. So I have a background image and I want to insert another image over it. A ball for example. But this ball get on top of the background and it streches to full screan. 1) How to make matlab plot a picture in its original size. I don`l want to be stretched. 2) My ball picture is a PNG file so i need not to show the transparent pixels. I used: A = imread('ball.png','BackgroundColor','none'); image(A) but it isn`t working.. 3) Can I load an animation or sound in the plot figure. For example if we have a goal then some fireworks appears or sound? This is every thing I have to ask. Than you very much if some on can help me! You might have to overwrite the original pixels like this demo does: % Read in a standard MATLAB gray scale demo image. folder = fullfile(matlabroot, '\toolbox\images\imdemos'); baseFileName = 'mandi.tif'; fullFileName = fullfile(folder, baseFileName); % Get the full filename, with path prepended. fullFileName = fullfile(folder, baseFileName); if ~exist(fullFileName, 'file') % Didn't find it there. Check the search path for it. fullFileName = baseFileName; % No path this time. if ~exist(fullFileName, 'file') % Still didn't find it. Alert user. errorMessage = sprintf('Error: %s does not exist.', fullFileName); uiwait(warndlg(errorMessage)); return; end end grayImage1 = imre...

Hello all, I would like to spawn multiple matlab processes from an '.m' script. Meaning, run an m-file from a 'parent' Matlab that launches, say, 8 more 'children' matlab processes. I'd like to do it in such a way that the same m-file in the 'parent' is able to close down, or kill, all the 'children' processes. Any suggestions? Joe ...

Hello All, I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡ ...

Hello, Isnt 'unquant' and 'soft' options essentially same?..in both case vitdec takes in "real numbers" as input (ok they are "mapped" in case o 'soft' option)..so can we not use 'unquant' option to carry out sof decoding?...my preliminary results show that 'unquant' option give me 2- db gain over hard decoding... any one having insight please let me know. thanks >Hello, > Isnt 'unquant' and 'soft' options essentially same?..in both cases >vitdec takes in "real numbers" as input (ok they are "mapped" in case of >'soft' option)..so can we not use 'unquant' option to carry out soft >decoding?...my preliminary results show that 'unquant' option give m 2-3 >db gain over hard decoding... >any one having insight please let me know. >thanks > > %%% Yes , u can use 'unquant' as soft decoding. try to implement for k=3 i.e [5 7] and BPSK and at roughly 4 dB u should get BER of 10^-3. Chintan ...

http://mycarta.wordpress.com/2012/04/05/visualization-tips-for-geoscientists-matlab-part-ii/ ...

Thanks Laki, ur answer could be right if I apply the effect of the channel to the signal then i add the noise, but what i do is adding the noise efect first then applying the channel effect to the sum (signal+noise), to get channel*(signal+noise), so after equalization i'd have ---> (channel*(signal+noise))/channel -- > signal+noise. hope u got what i mean .! thanks alot Laki for ur participation Hany Hany That's an interesting way to model the system, but i'll come back to that. What I think you're trying to do is this H*S / H_est = S where H = channel and H_est is the channel estimate (therefore inv(H_est) represents the inverse channel which you're calling an equaliser). Now, have you tried looking at the result of simply convolving the channel and the equaliser? H / H_est = 1 What do you get out of this? If that is difficult to obtain, then can you substitute the signal S for an impulse function (no noise) and examine the signal at the output of the equaliser? What do you get? The reason i say that it's an interesting way to model the system, is because you seem to be adding noise prior to the channel. One form of noise is typically added to model the thermal noise effects at the receiver. What you're doing it seems is receiving the signal noiselessly and are adding noise at the output of the transmitter. Now, this may not be a bad thing, because you could be trying to model some form of interference, but you haven&...

I downloaded the MS visual C++ 2008 Express Edition and the SDK as detailed in http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/?solution=1-6IJJ3L My embedded function didnt work at the beginning because I did "mex -setup" before I installed my SDK. But after I installed the SDK, I ran "mex -setup" in Matlab once again and choose the MS visual C++2008 as my compiler. Then, my embedded matlab function worked. Thanks to the contribution from above! ...

Is there a patch available to get Femlab v2.2 to work with Matlab 6.5? I can start Femlab, but there are errors in Matlab whenever I try to actually do anything in Matlab, such as open one of the models in the model library. Alternatively, does anyone know where I can buy an older version of Matlab, version 5.3.1 or 6.0? ...

Need help with these questions..any help is much appreciated.... Here is my code for the first part if its of any use but I need help with the questions.. explanation for the answers would be great.thanks 1) Write the Matlab code. The routine syntax should be [A,p,k]=partition5(A,low,upp) The output p is the value of the pivot and k the index of the pivot. The latter is required in order to know what the ‘left’ and ‘right’ vector parts are. 2) Sketch the situation at the end of the loop for the two cases that the pivot happens to be the smallest or largest vector element. Are these cases treated correctly by your code? 3) As mentioned before, the ‘unsorted yet’ part of the vector is indicated by the indices running from i to j. Is it possible that i equals j? Is your code treating this correctly? 4) Check your routine for several vectors A .Consider also examples with multiple vector elements having the same value (including the pivot element ). 5) a) What are the indices of the left and right part after the partitioning? b) When can the recursion be stopped? file: function[A,P,k] = partition5(A,low,upp) % syntax: function [A,P,k]=partition5(A,low,upp) % % A function to take a pivot and sort lower values to the left and all % higher values to the right % % Input % A: vector to be sorted % low: lower index of part of vector A to be sorted % upp: upper index of part of vector A to be sorted % O...

hi, I'm using a matlab function with C# (visual studio 2005), My Problem: when i call the function i have a problem in converting int to MathWorks.MATLAB.NET.Arrays.MWArray my function is called like that: testMatlab.testMatlabclass t = new testMatlab.testMatlabclass(); t.functionName(int, int, int, int); what should i do??? i will be so gratful... tnx ...

I have written some code in matlab for my application. I want to make a graphical interface so that an user can easily use my code. I do not know, how to link my code or a particular function when user clicks on a particular button. I mean, how to assign a function written by me to a push button so that it will execute the function. And how to give the input to my function and get output after executing the particular function. I am quiet familiar with matlab code. But I am absolutely new with GUI in matlab. Please help me to deal with the above problem. On 4/12/2011 12:37 AM, sk maidul haque wrote: > I have written some code in matlab for my application. > I want to make a graphical interface so that an user can easily use my code. > I do not know, how to link my code or a particular function > when user clicks on a particular button. I mean, how to assign a > function written by me to a push button so that it will execute the function. > And how to give the input to my function and get output after > executing the particular function. > I am quiet familiar with matlab code. But I am absolutely new with > GUI in matlab. Please help me to deal with the above problem. Use GUIDE to make the gui. It is very simple and powerful to use. I use it all the time for my school projects and HW's. I know some prefer to code the thing by hand, but I prefer GUIDE. When you add a button in GUIDE, it will create a callback stub for you automatically...

dear community, Matlab should read 4 different excel files by iteration. The changing string is replaced by the variable tierversuch. My code looks like this: tierversuch = ['061011_Healthy_SHJ','061011_HealthySR1_SHJ','061011_HealthySR2_SHJ','061011_HealthySR4_SHJ']; for i=1:1:size(heart_case) [ndata, headertext]=xlsread(['TV2(061011)/ReinControl ', tierversuch(i), '.xls'], 'Data Pad'); Error message: ??? XLSREAD unable to open file TV2(061011)/ReinControl 0.xls. Why is '061011_Healthy_SHJ' displayed as only an '0'? How should I implement this? "Yu " <yuzhaoshice@web.de> wrote in message <jcn46g$7c3$1@newscl01ah.mathworks.com>... > dear community, > > Matlab should read 4 different excel files by iteration. The changing string is replaced by the variable tierversuch. My code looks like this: > > tierversuch = ['061011_Healthy_SHJ','061011_HealthySR1_SHJ','061011_HealthySR2_SHJ','061011_HealthySR4_SHJ']; > for i=1:1:size(heart_case) > [ndata, headertext]=xlsread(['TV2(061011)/ReinControl ', tierversuch(i), '.xls'], 'Data Pad'); > > Error message: > ??? XLSREAD unable to open file TV2(061011)/ReinControl 0.xls. > > Why is '061011_Healthy_SHJ' displayed as only an '0'? How should I implement this? With your current declaration of tierversuch, tierversuch(i...

Hello, I am very stupid to ask this. I have a matrix A and want a new matrix B. I explained below what it is: A= 1 y1 2 y2 3 y3 4 y4 B= -2 y4 5 y5 I want to transform -1 y5 6 y6 ---------------------------------------------> 0 y6 7 y7 only X coordinates +1 y7 8 y8 and out put matrix +2 y8 9 y9 have this form +3 y9 10 y10 +4 y10 11 y11 12 y12 the provided info: index boundaries (upper and lower, here 4 & 10) and index to be set zero (here 6). I would like to know how to implement this in Matlab where upper, lower and index-set-zero should be variable. Can Anyone help me. Awaiting for your response. Thanks Somnath Karmakar wrote: > Hello, I am very stupid to ask this. I have a matrix A and want a new > matrix B. I explained below what it is: ....elided for brevity... > the provided info: index boundaries (upper and lower, here 4 & 10) > and index to be set zero (here 6). I would like to know how to > implement this in Matlab where upper, lower and index-set-zero should > be variable. Can Anyone help me. Awaiting for your response. Thanks >> % straight-ahead solution >> a=[(1:1...

can anyone help me in integrationg c# with matlab 7 "amira ali" wrote in message <irfu4n$h07$1@newscl01ah.mathworks.com>... > can anyone help me in integrationg c# with matlab 7 You should use a deploytool to built your .Net assmply .dll then you can import it in C# as references .. see these links http://www.mathworks.com/support/tech-notes/1600/1608.html http://www.mathworks.com/help/toolbox/compiler/example_guide/br9zbie-1.html I'm working on the same task these days.. I hope that help you... Maha "Maha Ghazi" wrote in message <irfuqo$ikm$1@newscl01ah.mathworks.com>... > "amira ali" wrote in message <irfu4n$h07$1@newscl01ah.mathworks.com>... > > can anyone help me in integrationg c# with matlab 7 > > You should use a deploytool to built your .Net assmply .dll > then you can import it in C# as references .. > see these links > http://www.mathworks.com/support/tech-notes/1600/1608.html > > http://www.mathworks.com/help/toolbox/compiler/example_guide/br9zbie-1.html > > I'm working on the same task these days.. > I hope that help you... > > Maha thanks maha but i want matlab compiler and bulider as they are trial version can i found them with u of u can send me to email :amiraali2005@gmail.com i found link may be useful for u http://read.pudn.com/downloads133/ebook/567108/CSharp_MATLAB/readme.doc "amira ali" <amiraali2005@gmail.com&...

I wrote a code in matlab 7a andand it was working over there then i changed computer which was having matlab realease 2009a and it is not working If i install Matlab 7 release 14, will my code work again thanks "moonman" wrote in message <ipmsl7$23v$1@fred.mathworks.com>... > I wrote a code in matlab 7a andand it was working over there > then i changed computer which was having matlab realease 2009a and it is not working > > If i install Matlab 7 release 14, will my code work again thanks Can you be more specific about the fact that your code is not working in 2009a but worked in 2007a? It would be helpful if you could narrow down what is not working in 2009a and provide error messages. Wayne ok thanks wyne i will send error message after some hours ...

"Kleindeutschland" redirects here. For the neighborhood in New York City, see Little Germany, Manhattan . 1820 map of Central Europe showing ...

Australians are perfectly happy to shrug over boring, vital issues – but force our free citizenry to occasionally adjust their clocks? That, ...

Australians are perfectly happy to shrug over boring, vital issues – but force our free citizenry to occasionally adjust their clocks? ...

It's a tangled, database web out there. (credit: Getty Images) Poke around the infrastructure of any startup website or mobile app these days, ...

Filed under: Etc. , Automotive History During the engine-displacement arms race, car companies vied for the raciest-looking numerical badges. ...

SunTrust Robinson Humphrey ’s Robert Peck , who has beaten the drum louder than anyone else on the Street about the lack of responsiveness of ...

Yesterday, the FBI announced that it had managed to break into the San Bernardino shooter's iPhone sans help from Apple. The iPhone manufacturer ...

(Don Boudreaux) Tweet Last night in my Principles of Microeconomics class at George Mason University (ECON 103) my students and I discussed ...

On your toes, applicants: What's your game plan if you find a penguin in the freezer?

No matter what happens to the markets, retirees should ask these three key questions to keep money safe, say financial advisors.

Resources last updated: 3/31/2016 1:33:30 AM