fast binary to decimal matrix question
Hello All.. I have a big matrix of binary values and i want to change it to decimal, following is what i am doing and this is very slow for me as i am required to apply the transformation on thousands of matrices X=ones([10000,3]); % assume one the binary matrix of 10,000 binary number tic F=bin2dec(num2s... 25 Feb 2010 14:48
Replace strings without loop
Here is my solution, str0 = '0010210020010000200000012102' [mstr,sstr] = regexp(str0, '1[0]+2', 'match', 'split'); mstr1 = regexprep(mstr,'0','3'); str1 = [sstr; [mstr1 {''}]]; str = [str1{:}] Results: str0 = 0010210020010000200000012102 str = 0013213320013... 25 Feb 2010 13:40
Replace strings without loop
Hi I have a string: str0='0010210020010000200000012102', and try to replace all 0s between 1 and 2 with 3, i.e., str = regexp(str0, '1[0]+2', 'match') str = '102' '1002' '100002' '102' So str0 should be '0013213320013333200000012132' Could you please help me do it without loops? Thanks,... 25 Feb 2010 12:31
DE2 board connect with Matlab
Hi: I want to know how to connect the DE2 board or FPGA with Matlab. I want to transmit the digital data from FPGA to Matlab. How do I do that? Thank you very much ... 25 Feb 2010 12:31
Trimming referenced models
I am attempting to create a 6DOF aircraft simulation (a plant model) using model referencing (which I have not done before). I am having difficulty trimming the model to steady state initial conditions. The trim command doesn't work with referenced models. I am capable of developing an algorithm on my own to trim th... 25 Feb 2010 12:31
Voice Compression
Hi all, Im in the process of developing a voice compression method. The method i intend to use is after sampling a voice signal dividing it in to frames and getting FFT. then zero out some random frequencies inorder to achieve compression. But im stuck at few points. What is the proper way to sample a voice sign... 25 Feb 2010 12:31
Simulink, compilation warning
Hi, I'm new to this forum and I hope to find some answers to my problems. First of all I'm a begginer in MatLab/Simulink and all I've learned has been learned by myself, no teacher, so probably I lack in some easy fundamentals. I'm developing a Simulink model for the simulation of an helicopter, this is by now a ve... 3 Mar 2010 07:20
Fitting to a custom function
Hi there, New Matlab user here. Trying to define a function that I want to try and fit my data to and I'm struggling to get it to work. Here's what I have: I have two 801x1 array, "Freq" and "data", the x and y data respectively. I want to try and fit to the equation: Y = K1 * 1 / (1 - K2*j*omega*tau), where o... 26 Feb 2010 07:25
Fitting to a custom function
Hi there, New Matlab user here. Trying to define a function that I want to try and fit my data to and I'm struggling to get it to work. Here's what I have: I have two 801x1 array, "Freq" and "data", the x and y data respectively. I want to try and fit to the equation: Y = K1 * 1 / (1 - K2*j*omega*tau), where o... 25 Feb 2010 11:23
save integers in a text file
> M = round((rand(10,2)-.5)*65536); % generate integer matrix M fid = fopen('test.txt','w'); fprintf(fid,[repmat('%g ',1,size(I,2)),'\n'], M); fclose(fid); typo: size(I,2) --> size(M,2) otherwise works well :) ... 25 Feb 2010 11:23