f

#### Need help with some MATLAB coding problems

```I have the following problems and no idea where to begin:

1) The function takes one string that contains two words separated by a space and returns true if the two words are identical (case sensitive).Otherwise, it should return false.
Test Case:
out1 = compareTwo('winner winner')
out1 -> true

2) The function takes in a string which is a sentence of upper and lower case letters. The function then removes the upper case letters to reveal a secret message. The result should not contain any upper case letters. The result may contain lower case letters, spaces and numbers.
Test Case:
B = decodeMessage('FcJoLDdSiKngJL FiSHsOH KJfHunKV')
B -> 'coding is fun'

3) This function takes in a string and a double and uses interpolation and the ASCII values of the string to create a new string. The result must be of the specified given size (double) and must be a string (of type char).  Do not do any rounding; MATLAB will take care of rounding whencasting to a string. For interp1, use the indices of the string as x values [1:length(str)]. The new x values should be linerally spaced and should range from 1 to the length of the string.
Test Case:
ch_interp2 = charInterp('zap',27)
ch_interp2 -> 'zxvtrpnljhfdbabcdefgijklmnp'

4)  The function takes in two strings, the first of which contains the old string, and the 2nd containing a string that may be embedded within the first input string (e.g. 'as' is embedded in 'last'). The function then returns a single string that is generated based on the following criteria:
1) Whenever a space is detected in the 1st input string, add the character (or space) after the space to the output word.
2) Whenever the 2nd input string is detected within the 1st input string, add the letter preceding the index at which the embedded string was found in the 1st input string to the output word. You may assume that only letters will precede this particular string.
3) If an indices found from 1) and 2) are the same, simply include the same referenced character twice.
4) The letters specified in 1) and 2) should be assembled into the output word in the order in which they originally appeared.
Test Case:
new = frankenstein('S07p1m07t0i07t07s7h07','07')
new -> 'Smith'

5) The function takes one string and returns the string in title case. That is, every first letter in every word should be capitalized, and every other letter should be lowercase.
(this one's pretty obvious)
```
 0
visualxd (50)
9/11/2009 1:23:42 AM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader.

9 Replies
1618 Views

Similar Articles

[PageSpeed] 16

```NouveauIX wrote:
> I have the following problems and no idea where to begin:
....
These sound/look remarkably like homework string function exercises.
Maybe start w/ instructor's lecture notes???

--
```
 0
none1568 (7453)
9/10/2009 10:29:52 PM
```On Sep 10, 7:13=A0pm, NouveauIX <visua...@gmail.com> wrote:
> Okay, I ended up figuring out Problem 2. Problem 1 is still giving me hea=
daches though and I have yet to solve the rest. So #1 is the priority atm, =
can't figure out how to do a strcmp if it's just one string.

hey!! do u know how to do the third one???
```
 0
smntshrma (1)
9/10/2009 11:27:57 PM
```Okay, I ended up figuring out Problem 2. Problem 1 is still giving me headaches though and I have yet to solve the rest. So #1 is the priority atm, can't figure out how to do a strcmp if it's just one string.
```
 0
visualxd (50)
9/11/2009 2:13:51 AM
```On Sep 10, 11:12=A0pm, NouveauIX <visua...@gmail.com> wrote:
> Still have left:
>
> 3) This function takes in a string and a double and uses interpolation an=
d the ASCII values of the string to create a new string. The result must be=
of the specified given size (double) and must be a string (of type char). =
Do not do any rounding; MATLAB will take care of rounding whencasting to a =
string. For interp1, use the indices of the string as x values [1:length(st=
r)]. The new x values should be linerally spaced and should range from 1 to=
the length of the string.
> Test Case:
> ch_interp2 =3D charInterp('zap',27)
> ch_interp2 -> 'zxvtrpnljhfdbabcdefgijklmnp'
>
> 4) The function takes in two strings, the first of which contains the old=
string, and the 2nd containing a string that may be embedded within the fi=
rst input string (e.g. 'as' is embedded in 'last'). The function then retur=
ns a single string that is generated based on the following criteria:
> 1) Whenever a space is detected in the 1st input string, add the characte=
r (or space) after the space to the output word.
> 2) Whenever the 2nd input string is detected within the 1st input string,=
add the letter preceding the index at which the embedded string was found =
in the 1st input string to the output word. You may assume that only letter=
s will precede this particular string.
> 3) If an indices found from 1) and 2) are the same, simply include the sa=
me referenced character twice.
> 4) The letters specified in 1) and 2) should be assembled into the output=
word in the order in which they originally appeared.
> Test Case:
> new =3D frankenstein('S07p1m07t0i07t07s7h07','07')
> new -> 'Smith'
>
> 5) The function takes one string and returns the string in title case. Th=
at is, every first letter in every word should be capitalized, and every ot=
her letter should be lowercase.
> (this one's pretty obvious)
>
> Forgot to mention I can't use any iteration or conditional control blocks=
, if that affects anything. I'm going to bed so if there's anyone who can g=
ive me some ideas on where to start it'd be very helpful.

The other ones really aren't hard at all. Most can be done with two
lines of code. But at least its not due at midnight or anything. And
its a really good thing that there isnt a test on monday. For the
title case one, upper() is your friend.
```
 0
9/11/2009 3:25:48 AM
```Still have left:

3) This function takes in a string and a double and uses interpolation and the ASCII values of the string to create a new string. The result must be of the specified given size (double) and must be a string (of type char). Do not do any rounding; MATLAB will take care of rounding whencasting to a string. For interp1, use the indices of the string as x values [1:length(str)]. The new x values should be linerally spaced and should range from 1 to the length of the string.
Test Case:
ch_interp2 = charInterp('zap',27)
ch_interp2 -> 'zxvtrpnljhfdbabcdefgijklmnp'

4) The function takes in two strings, the first of which contains the old string, and the 2nd containing a string that may be embedded within the first input string (e.g. 'as' is embedded in 'last'). The function then returns a single string that is generated based on the following criteria:
1) Whenever a space is detected in the 1st input string, add the character (or space) after the space to the output word.
2) Whenever the 2nd input string is detected within the 1st input string, add the letter preceding the index at which the embedded string was found in the 1st input string to the output word. You may assume that only letters will precede this particular string.
3) If an indices found from 1) and 2) are the same, simply include the same referenced character twice.
4) The letters specified in 1) and 2) should be assembled into the output word in the order in which they originally appeared.
Test Case:
new = frankenstein('S07p1m07t0i07t07s7h07','07')
new -> 'Smith'

5) The function takes one string and returns the string in title case. That is, every first letter in every word should be capitalized, and every other letter should be lowercase.
(this one's pretty obvious)

Forgot to mention I can't use any iteration or conditional control blocks, if that affects anything. I'm going to bed so if there's anyone who can give me some ideas on where to start it'd be very helpful.
```
 0
visualxd (50)
9/11/2009 6:12:28 AM
```Okay I'm at this point with titleCase:

function str=titleCase(str)
space=isspace(str)
first=[true space]
rest=not(first)
str=upper(str(first))&lower(str(rest))

Not working yet. Without the "&lower..." I just get a return of, say, ILP for input 'i love pizza'. What happened to the rest of the letters?
```
 0
visualxd (50)
9/11/2009 7:03:46 AM
```NouveauIX <visualxd@gmail.com> wrote in message <1806712363.10850.1252621452369.JavaMail.root@gallium.mathforum.org>...
> I have the following problems and no idea where to begin:
>
> 1) The function takes one string that contains two words separated by a space and returns true if the two words are identical (case sensitive).Otherwise, it should return false.
> Test Case:
> out1 = compareTwo('winner winner')
> out1 -> true
>
> 2) The function takes in a string which is a sentence of upper and lower case letters. The function then removes the upper case letters to reveal a secret message. The result should not contain any upper case letters. The result may contain lower case letters, spaces and numbers.
> Test Case:
> B = decodeMessage('FcJoLDdSiKngJL FiSHsOH KJfHunKV')
> B -> 'coding is fun'
>
> 3) This function takes in a string and a double and uses interpolation and the ASCII values of the string to create a new string. The result must be of the specified given size (double) and must be a string (of type char).  Do not do any rounding; MATLAB will take care of rounding whencasting to a string. For interp1, use the indices of the string as x values [1:length(str)]. The new x values should be linerally spaced and should range from 1 to the length of the string.
> Test Case:
> ch_interp2 = charInterp('zap',27)
> ch_interp2 -> 'zxvtrpnljhfdbabcdefgijklmnp'
>
> 4)  The function takes in two strings, the first of which contains the old string, and the 2nd containing a string that may be embedded within the first input string (e.g. 'as' is embedded in 'last'). The function then returns a single string that is generated based on the following criteria:
>  1) Whenever a space is detected in the 1st input string, add the character (or space) after the space to the output word.
>  2) Whenever the 2nd input string is detected within the 1st input string, add the letter preceding the index at which the embedded string was found in the 1st input string to the output word. You may assume that only letters will precede this particular string.
>  3) If an indices found from 1) and 2) are the same, simply include the same referenced character twice.
>  4) The letters specified in 1) and 2) should be assembled into the output word in the order in which they originally appeared.
> Test Case:
> new = frankenstein('S07p1m07t0i07t07s7h07','07')
> new -> 'Smith'
>
> 5) The function takes one string and returns the string in title case. That is, every first letter in every word should be capitalized, and every other letter should be lowercase.
> (this one's pretty obvious)

Hi! Here are some hints for you

1) Comparing two strings - you use function strcmp

>> string1 = 'winner'

string1 =

winner

>> string2= 'winner'

string2 =

winner

>> result = strcmp(string1,string2)

result =

1

% it return 1 (true) if the two strings are equal as in your case and 0 if the two strings are not the same

2) For lowecase use function lower , for uppercase use function upper

>> string = 'FcJoLDdSiKngJL FiSHsOH KJfHunKV' % defining your string

string =

FcJoLDdSiKngJL FiSHsOH KJfHunKV

>> restult1=lower(string) % convert to lowercase using function lower

restult1 =

fcjolddsikngjl fishsoh kjfhunkv

>> result2=upper(string) % convert to uppercase your string using function upper

result2 =

FCJOLDDSIKNGJL FISHSOH KJFHUNKV

>>

For questions 3,4 and 5 read the help (press F1 key), then go to the search tab and look for interpolation ( or help interp1 in command window) and so on... to complete your other 2 tasks.(3,4 and 5 points).
```
 0
mihaispr (1097)
9/11/2009 8:05:20 AM
```NouveauIX wrote:
> Okay I'm at this point with titleCase:
>
> function str=titleCase(str)
> space=isspace(str)
> first=[true space]
> rest=not(first)
> str=upper(str(first))&lower(str(rest))
>
> Not working yet. Without the "&lower..." I just get a return of, say,
> ILP for input 'i love pizza'. What happened to the rest of the
> letters?

doc relop

What does that say "&" actually does and why are you using it here?

help paren % particularly brackets

help strcat

--

```
 0
none1568 (7453)
9/11/2009 2:07:15 PM
```"NouveauIX" <visualxd@gmail.com> wrote in message
news:1806712363.10850.1252621452369.JavaMail.root@gallium.mathforum.org...
>I have the following problems and no idea where to begin:

*snip*

Others have given you some specific hints; I'm going to give you a general
hint for the future.

All of these exercises use string manipulation in some way.  If you open up
the Help Browser (using the DOC function) and search for "string", you'll
find plenty of hits (depending on what products you have installed, you may
find hundreds or thousands of hits.)  If you narrow down the search to
something like "string comparison" you should find many fewer hits, but the
first page of hits will show some pages (both general discussions about
string comparisons and reference pages for functions that you'll find useful
for performing string comparisons) that you can use to solve these problems.
It may take a little tweaking of your search terms to find exactly what
you're looking for, but if you learn how to work with the documentation I
think you'll find it a useful skill going forward.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

```
 0
slord (13689)
9/11/2009 2:31:06 PM

Similar Artilces:

MatLab coding help needed for basic engineering problem
Hiya, i've been trying to figure out a way to create a code to differentiate, integerate and plot the results for a fluid mechanics problem and would really appreciate any sort of help that i can get. The problem's about volume-flow through a pump. What i'm meant to do is make a GUI through GUIDE and have 3 m-files which can load data from 2 excel files. the excel files contain 2 columns of Q(volume flow) and time and numerous rows of values taken at different time intervals. What i'm supposed to do is create three m-files to determine: a. The change of volume flow with respect to time of the fluid in the pump i.e dq/dt. b. The volume of fluid entering the hydraulic circuit / | | Q dt | / (integrate Q with respect to t) c. A function file that determines the difference in the volume of fluid in this system and a similar system without a leak, which means the 2 data sets in the 2 excel files. they have been sampled at different rates so i need to interpolate them as well. And in the end, plot all a, b, and c with respect to time. The problem is, i find the derivative of Q with respect to t throw diff(q)./diff(t)...which ultimately caused the resulting dataset to have one element less than q or t, and thus, i cant plot it against t. how do i add another element to diff(q)./diff(t)? i tried using size(dqdt) = [1001,1] => adding one more element to the set but it doesnt accept it (dqdt is diff(q)./diff(t)). What should i do? i believe this would be fair...

Help Needed on Matlab Code to Generate Orthogonal Codes
I am new to matlab but I need code urgently to pass my final year project. The project intends to compare Walsh-Hadamard and Gold codes. The matlab code should do the following: ---------------- PART ONE: ---------------- (1) generate random message bits (2) generate walsh-hadamard codes (3) modulate the signal (4) transmit the spreaded signal (5) plot the message and walsh-hadamard codes as rectangular pulses; also plot the spreaded signal, with labels on plots. (6) on the same figure, do the reverse, i.e plot the demodulated, de-spreaded signal, just as it was shown at the transmitter side. (that is transmitter plots on left and receiver plots on right, on the same figure). ----------------- PART TWO: ----------------- (1) introduce noise to the channel (2) simulate in single user environment (3) simulate in multi-user environment (4) plot the autocorrelation and cross correlation (5) plot the Bit Error Rate (BER) ------------------- PART THREE: ------------------- Repeat the process in PART ONE and PART TWO for Gold codes. I know this project is big and challenging, but I need help and I will surely appreciate all the necessary help I can get in this forum. Thank you in advance! My Contact Info: ------------------------------- netfluz@yahoo.com netfluz@facebook.com facebook.com/netfluz +2348132935268 I have done some work on the project and I have these Matlab codes. My problem is tuning or modifying these codes to fit the format I described above (i.e to serve th...

Elaborate Help Needed on Matlab Code to Generate Orthogonal Codes

i need help in matlab coding
please any volunteer can give a code for the ieee paper Data Hiding in Motion Vectors of Compressed Video Based on Their Associated Prediction Error by Hussein A. Aly, Member, IEEE please i need it...so important...please if any one can do it please contact me:preetamreddy.pothala@gmail.com preetampothala@gmail.com thanks.... ...

Need help for a matlab mini project
Hello everyone, I have a matlab in class exercise due in few days. I am new to matlab and the instructions provided with the assignment is minimal. Can Someone help me with the basic understanding as in how can I map the problem's solution to matlab script ? I am not able to post question here as it is a jpeg file. Please let me know and then we can discuss further. ...

Help needed to Parallelize matlab code
Hi all, I am involved a massive scale simulation where I intend to get 625 sets of Data. Each set of Data takes 20 hours with no parallel featuere implemented. If want to use the parallel computing toolbox and then distributed computing server from matlab, I need to parallelize the matlab code. However, I face problem in doing so and expecting some suggestions from you all.Templeate of my code is as follows--- *********625 sets********* for iii for jjj for kkk for lll ........i end end end end **********I use this 625 sets of parameters*** for r=1:625 ... ... for j=1:60 (another parameter) .... .... ...for k=0:100 (parameter) C=ode45 %calling ODE solver function parameters=[.......] %passing parameters Data=function(parameters) %calling function to simulate...we are using ensemble_run from simbiology 3.0 tool box to simulate% MAIN DATA(k+1, 1)=Data; end MAIN_DATA_2(:,j)=MAIN DATA end renaming data files based on "r" save MAIN_DATA_2_renamed end end *********************************************************** Even when I try to use parfor, it says that the way MAIN_DATA, ODE SOLVER, MAIN_DATA_2 is defined, I can't implement parfor. Could you guys help on how to parallelize the code? I am not so familiar with parallel concept of matlab. Thanks, Shahriar ...

need help for matlab c++ code
hi friends , 1)i have a C++ program for resource allocation for real time services in ofdm systems.I need to call this program to return the capacity for each user to draw a graph in matlab can anybody elucidate the steps how to embed the particular program in matlab. 2)i need to take input from rayleigh fading function in matlab to the c + program could somebody tell how to do that tooo On 20 Feb, 05:07, "sharad kumar.j" <aryansmit3...@gmail.com> wrote: > hi friends , > 1)i have a C++ program for resource allocation for real time services > in ofdm systems.I need to call this program to return the capacity for > each user to draw a graph in matlab can anybody elucidate the steps > how to embed the particular program in matlab. > 2)i need to take input from rayleigh fading function in matlab to the c > + program could somebody tell how to do that tooo Check out the External Interfaces part of the matlab documentation. Rune ...

some problems of codes of MATLAB 7.0 working on MATLAB 6.5
I have used MATLAB for few hours.So I don't know the differences between version 6.5 and 7.0.I want to use some codes of MATLAB 7.0, but they doesn't work in MATLAB 6.5.How to change these codes so that they can work in matlab 6.5.Waiting for your help. Thank you . The codes are like this .I think changing the function findPI may work ,but I don'y know how % PIfun.m % Evaluate a function used to find the PI-line, using Kyle Champley's % method. % % Adam Wunderlich % last update: 5/18/06 function y = PIfun(r,R,h,gamma,x3,sb) temp = R - r*cos(gamma-sb); y = h*((pi - 2*atan(r*sin(gamma-sb)/temp))*(1 + (r^2 - R^2)/ (2*R*temp)) ... + sb) - x3; % find_PI_Line.m % % Find the the parametric interval corresponding to the unique PI-line % passing through the point x for a given helical pitch. % This code implements the method of Kyle Champley. % inputs: P = pitch (cm/turn), R = helix radius, delta_s = s stepsize, x % output: PI = [sb st] % % Adam Wunderlich % last update: 5/18/06 function [PI] = findPI(P,R,delta_s,x) h = P/(2*pi); r = sqrt(x(1)^2+x(2)^2); gamma = atan2(x(2),x(1)); options = optimset('TolX',h*delta_s/100,'FunValCheck','on'); [sb,fval,exitflag] = fzero(@(sb) PIfun(r,R,h,gamma,x(3),sb),... [(x(3)-h*pi)/h,x(3)/h],options); if exitflag ~=1, disp('Error: PI invalid'); end % note that beta=sb in Kyle's formula alphaX = atan(r*sin(gamma-sb)/(R - r*cos(gamma-sb))); st = sb + pi -...

need help with text detection MATLAB code
plzzzz suggest coding for Morphological edge detection,text feature filtering and text region binarization!!! Else just suggest algorithms for them all!! On Wednesday, April 18, 2012 7:00:26 PM UTC+12, supriya wrote: > plzzzz suggest coding for Morphological edge detection,text feature filte= ring and text region binarization!!!=20 > Else just suggest algorithms for them all!! Here's a couple of suggestions: E=3Dm*c^2 x=3Db =B1 sqrt(b^2-4*a*c)/(2*a) ...

need help with this matlab problem(NN tolbox)
hello everybody, i m currently trying to recognise diffrent shapes like triangles,circles, polygons etc. i hv 36x36 binary images. I m presently trying it with matlab toolbox. My network consists of 3 layers with 1296 neurons in the input and 144 in the hiddenn and 6 in the output layer. but when I tried to simulate the network with sim() function, i get this kind of error. ??? One or more output arguments not assigned during call to 'K:\Matlab\toolbox\nnet\nnet\@network\sim.m (simargs)'. Error in ==> network.sim at 183 case 2, [err,P,Pi,Ai,T,Q,TS,matrixForm] = simargs(net,P); but i don't get this error when data is not so large. and suggest me a better book or online material for neural network design. can someone help with this problem... thanking you , bye ramanjaneyulu What is simargs? I don't have one on v6.5. R13 SP1 Greg ...

MATLAB volume problem need HELP asap

Invariant moment In Matlab , help needed, analyze some problem
I am trying to use invariant moment to "code" some letters from a road sign, surprisingly I get this weird results in Matlab (please see picture..) http://yfrog.com/e5neveshananasdg As you can see there is two letters (Hebrew :) ) one is very different from the other, but still when calculating the moments I get the same results (the seven moments appear above the pic). I have two question : 1) Is this technique good for this kind of a problem? 2) I would expect to get a very diffrent result from this two letters, but still they are almost they same, y ? Thanks O On Nov 1, 10:30=A0pm, Eizo <odpe...@gmail.com> wrote: > I am trying to use invariant moment to "code" some letters from a > road > sign, surprisingly I get this weird results in Matlab (please see > picture..) > > http://yfrog.com/e5neveshananasdg > > As you can see there is two letters (Hebrew :) ) one is very > different > from the other, but still when calculating the moments I get the same > results (the seven moments appear above the pic). > =A0I have =A0two question =A0: > > 1) Is this technique good for =A0this kind of a problem? > 2) I would expect to get a very diffrent result from this two > letters, > but still they are almost they same, y ? > > Thanks > O anyone ? ...

need help to find the error on matlab textscan code
Dear all, I'm working on a alphanumeric data set. I have a code you can find below and i need help on finding the problem on it. My data is something like this: '0,udp,private,SF,105,146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,254,1.00,0.01,0.00,0.00,0.00,0.00,0.00,0.00' '0,udp,private,SF,105,146,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,254,1.00,0.01,0.00,0.00,0.00,0.00,0.00,0.00' > > fid = fopen('data.txt','rt'); > > data=textscan(fid,'%s','delimiter'); > > fclose(fid); > > > > % Engine - use regexp! > > data=cat(1,data{:}); > > String_data=regexp(data,'([A-Z a-z]+)','match'); % Remove all numeric > > Numeric_data=regexp(data,'([0.00-9.99]+)','match'); % Remove all letters > > > > Numeric_data=cat(1,Numeric_data{:}); > > String_data=cat(1,String_data{:}); > > DATA=[String_data(:,1:end-1) Numeric_data(:,1:end-1) String_data(:,end)]; The problem is that, when i use exactly the same data lines like above , it works perfectly and DATA is exactly the thing i want to find. But for example at the 3rd column where the string private, we also have http, smtp etc strings at different rows of the dataset.. So the problem is that, if the number of characters in a string is different in two lines, the code gives an error message . If they are exactly same it work...

Help me to convert the C++ code to Matlab code
Some one Help me to convert the following C++ code to Matlab code for(init x=-5; x++ ; x<=10) { if (x<=0) y=2; else y=3 * x; plot (x,y) } ...

'Matlab Code' to 'Embedded Matlab fun code'
Dear friends, I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simulink and I want to use it in 'Embedded Matlab fun block' so i need to transform 'Matlab code' to 'Embedded Matlab fun code' to perform the task. The Matlab code is as follows: %%%%%%%%%%%%%%%%%%%%% u_abs = abs(u); major_th = 1.5e-1; minor_th = 1.8e-2; major_peak_value = []; minor_peak_value = []; pos = 1; pos_max = 1; while ~isempty(pos) [m pos_max(end+1)] = max( u_abs( pos : pos + 10) ); pos_max(end) = pos_max(end) + pos - 1; if m > major_th major_peak_value(end+1) = m; else minor_peak_value(end+1) = m; end % exit the peak pos = find(u_abs(pos:end) < minor_th, 1 , 'first') + pos-1; % Find the beginning of the next peak pos = find(u_abs(pos:end) > minor_th, 1 , 'first') + pos-1; end pos_max(2) = []; plot(u); hold on; plot(pos_max,u(pos_max),'ro'); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I think i don't need this plot command as I will see the result in the scope directly. Any suggestion will be very useful. Thanking you! Prashant "Prashant Sandhi" wrote in message <jafvj8\$soq\$1@newscl01ah.mathworks.com>... > Dear friends, > > I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simu...

Need Help With Matlab
Hi I am trying to simulate the low pass filtered output of a square wav (pulse train) using Matlab. The pulse varies between 0 and 1. So th filtered output looks somewhat like a sinewave. The filter is a low pas filter (FIR/raised cosine filter). Essentially what I need is to be abl to generate a look up table that will store the output waveform rise fall transition (from 0-1 and 1-0). So what i want essentially is to b able to generate a look up table of different lengths (like 100,50 etc) t store these transitions. I tried using Simulink for this, but havent bee successful so far. So my table will look something like 1 0.995 0.923 0.91 0.85 ..... to 0 Any help is highly appreciated. Thanks. Best regards Vikram ...

Matlab Code and help
Hi I need help on below...pls can some one give me the code I need to carry out these steps in Matlab.. Take an image in Raw in TIFF file...and then perform a) JPEG @ quality 100, 80, 60, 40, 20 and 0 b) SPIHT @ quality 100, 80, 60, 40, 20 and 0 c) EZW @ quality 100, 80, 60, 40, 20 and 0 Next step - Get MSE for all the above need to plot the graph.. Many Thanks "Indrasena " <mail2svijay@yahoo.com> wrote in message hello, may i know were you able to do this, becasue took me a while to do this code, need some clarificatiosn if you are done because i am done with SPIHT and EZW is left? what r u using the built in codes or the the matlab toolbox?? contact me at makeyourassignment@yahoo.com ...

Help with Matlab Problem

need to compute this problem having problems with how to start this problem help need urgently
Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)] of the phase-shifted sinusoid.X(t) = A*  cos(t +theta ): State also if X(t) is Wide Sense Stationary (WSS). plot 10 realisations of X(t) plotR(s-t,0)as a function of s-t "pramod kumar" <pramod.kilu@gmail.com> wrote in message <jpapso\$44b\$1@newscl01ah.mathworks.com>... > Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)] of the phase-shifted sinusoid.X(t) = A*  cos(t +theta ): > State also if X(t) is Wide Sense Stationary (WSS). > plot 10 realisations of X(t) > plotR(s-t,0)as a function of s-t So what have you tried? If you have not tried anything, this is a suggestion that you were not paying attention in class. Make an effort. John "pramod kumar" <pramod.kilu@gmail.com> wrote in message <jpapso\$44b\$1@newscl01ah.mathworks.com>... > Let   U[0; 2theta] be a uniform random variable from the interval [0; 2theta] and let A  Exp(1) be exponentially distributed with mean 1. Assume  and A independent. Compute the mean mX(t) =E[X(t)] and autocorrelation RX(s; t) = E[X(s)X(t)]...

GPS C/A code + DFT = ? matlab code help me pls
I have CA code of GPS, and I want to do DFT on the code in matlab and plot please help me On 5/30/2011 1:42 AM, Lk Khurelbaatar wrote: > I have CA code of GPS, and I want to do DFT on the code in matlab and plot please help me doc fft --Nasser On May 30, 8:42=A0pm, "Lk Khurelbaatar" <hourgla...@yahoo.com> wrote: > I have CA code of GPS, and I want to do DFT on the code in matlab and plo= t please help me And I want to spin straw into gold, help me please. ...

code of matlab 7a not working in matlab 2009
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 ...

Problems calling from Matlab a Matlab compiled dll

Matlab Plot ,need help!
Hi, everyone, Sorry to bother you! I want draw a picture with the Matlab. There will be ten lines in a picture and each line has ten points. I want to distinguish every line and every point. How to set? The following codes are used to distinguish the style of the line and mark the points on the same line. linestr={'k-o','k-s','g-*','b-d','b-h','g-p','r-+','k-x','b-<','b->','k-v','b--','g--','r--','k-'}; linewidth = 1.5; plot(rmss_def(:,n),rms_acc(:,n) ,linestr{jj},'linewidth',linewidth); I do really want to know the sequence of each point on a line. An arrow is ok which can tell me the first point and the end. If the size of the marksize can be changed automatically is also ok. How to do? Best wishes! Yours Sincerely, Xinjie Zhang ...

Need help with some Matlab homework

Web resources about - Need help with some MATLAB coding problems - comp.soft-sys.matlab

Problem novel - Wikipedia, the free encyclopedia
Working class, or proletarian novels are often also social problem novels . This was in many ways a reaction to rapid industrialization , and ...

Volkswagen recalling 5,600 electric cars due to a stalling problem
... Volkswagen will recall the 5,561 e-Golf electric vehicles that it’s sold in the US since November 2014 due to a battery software problem, the ...

FormFactor Drops 10%: Stifel Cuts to Hold, Summit Defends; ‘High-Class Problem’
... Nicolaus ’s Patrick Ho , who cut his rating on the shares to Hold From Buy, and stripped away his \$11 price target, writing that the problem ...

"All we need to do is change our 'frame' for terrorism and start treating it as a medical problem."
... terribly unfair – just to avoid contact with the 1% who might be infected with the radical islamic terror virus. Trump is approaching the problem ...

Samsung's biggest problem in a nutshell: Even when users upgrade, they upgrade to the wrong phone
Only about 40% of Apple's customer base upgraded to a new iPhone in the last year or so, and some analysts have suggested that flagging upgrade ...

The GOP's woman problem
Trump's poor showing with women is turning the GOP's gender gap into a canyon, says Margie Omero. That will be a big problem in November.

WH: Republicans' Rhetoric 'A Significant Problem' for Obama, Who's 'On the Hook' for Nat'l Security
"Their (Republicans') rhetoric is also counterproductive when it comes to protecting the American people. And that's a significant problem, particularly ...

The Real Problem With Trump’s Candidacy—It’s Much More Than Bad Manners
The Real Problem With Trump’s Candidacy—It’s Much More Than Bad Manners

Antonio Brown Had Some Boner Problems While Training For Dancing With The Stars
Steelers wide receiver Antonio Brown is a contestant on this season of Dancing With The Stars , and he made it through the latest round of cuts ...

Mickos on Security: Tech Is the Problem, People Are the Solution
Former MySQL Marten Mickos, now CEO of security vendor HackerOne, admits to a security debt that open-source must now pay.

Resources last updated: 3/31/2016 4:39:22 AM