return values from boolean
"Chris " <ridered300tr(a)hotmail.com> wrote in message <hl010i$jag$1(a)fred.mathworks.com>... I transformed my values into true and false like this: yr = (yr == 'char') %tests yr to see if values are 'char' class returned 0 0 0 0 0 0 0 I deleted the first few using: yr(1) = [] yr(1) ... 11 Feb 2010 00:39
return values from boolean
I transformed my values into true and false like this: yr = (yr == 'char') %tests yr to see if values are 'char' class returned 0 0 0 0 0 0 0 I deleted the first few using: yr(1) = [] yr(1) = [] but now I want to return my remaining values to double... How? ... 10 Feb 2010 23:33
Friction simulation
Hi, I'm designing a precision machine and need to figure out, before building the machine how friction will be affecting my system. I modelise my hole system on simulink but there is still the question of friction that is problematic. I dont really understand the parameter of the Coulomb & Viscous Frictio... 17 Feb 2010 00:09
Least Squares fit non-linear 3d plot
If I have an x,y,z matrix such as: x y z 1 10 500 2 10 700 3 10 800 1 20 750 2 20 850 3 20 950 How can I correctly implement the LSQCURVEFIT command: X = LSQCURVEFIT(FUN,X0,XDATA,YDATA,LB,UB,OPTIONS) I need the equation relating these points in a 3d space so i can create a nice surf or me... 28 Feb 2010 13:20
Uploading Data
I am running a test where I am saving my data as three *.BIN files and using Matlab to upload it and analyze it. I am uploading the data in the following way. fid0=fopen(['Data\File0.bin'],'r'); fid1=fopen(['Data\File1.bin'],'r'); fid2=fopen(['Data\File2.bin'],'r'); Data=fread(fid0,[80 Counts],'int16')'; Data(... 10 Feb 2010 23:33
How to pass white gaussian noise through a filter
Hi, I had a vector of white gaussian noise samples. These samples are to be passed through a root raised cosine pulse. The output of this is not white gaussian. So, it cannot be generated by using randn function. So, can anyone help on this. The exact scenario is as follows. received_signal = transmit +... 10 Feb 2010 22:27
Indexing HELP
I am trying change a value based on its position relative to a zero spaces = (str == ' ') % returns 1 at all blank spaces now I would like to change every position directly after the 1's. I'm trying to use: str(spaces) = (str(spaces))+'a'-'A' but this only changes the blank positions (the 1's)... Can some... 11 Feb 2010 08:17
Simulink Pulse Generator with amplitude between -1 and +1
Okay - I've got Simulink up and running and I'm using the Pulse Generator with a pretty simple transfer function and the scope. I would like however to use a pulse that goes from -1 to +1 instead of from 0 to +1. Is there any way to alter the Pulse Generator block so that the amplitude is between -1 and +1? Than... 11 Feb 2010 09:24
return larger of two numbers
"sean " <jssweeney(a)widener.edu> wrote in message <hkvliv$f3s$1(a)fred.mathworks.com>... What is the simplest way to do this? x=1 y=2 I want to assign the larger number to 'c'. I can think of a few ways, but there must be an easier way. Any builtin to handle this? Thanks. Hmmm ... so you want to assign t... 10 Feb 2010 22:27
replace values in a cell with nan
Hi all, I am trying to figure out a way to replace values in a cell array with NaN. I can do it with a loop, but I have somehow got myself into the CELLFUN habit and don't much like the look of the loop: %generate some data data=cellfun(@(x)(rand(x,1)),... num2cell(ceil(rand(5,1)*100)),'un',0); data = ... 10 Feb 2010 20:13