
David Hill
Electrical Engineering with minors in Computer Science and Mathematics. Working as an Undergraduate Research Assistant in the field of Robotics and Computational Photonics. Currently working on cutting-edge adaptive algorithms for controlling soft robots and other underdefined systems. Plan on continuing my education by pursuing a masters in mechanical engineering (robotics) and a MBA.
Python, C++, C, Java, MATLAB, HTML, Arduino
Spoken Languages:
English, Spanish
Statistics
RANK
41
of 262,899
REPUTATION
4,422
CONTRIBUTIONS
0 Questions
1,881 Answers
ANSWER ACCEPTANCE
0.00%
VOTES RECEIVED
482
RANK
2,520 of 17,995
REPUTATION
623
AVERAGE RATING
4.80
CONTRIBUTIONS
21 Files
DOWNLOADS
120
ALL TIME DOWNLOADS
4783
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
How to jump to first loop if nest for loop need to terminate due to condition
for i=1:10 for j=1:100 %code tline=fgetl(fid) if tline==-1 break; end fprintf(fid,tline) ...
2 hours ago | 0
how do i store mutiple txt files into a 3d matrix
Matrix=zeros(156,207,3000); for i = 1:3000 Matrix(:,:,i)=readmatrix(['frames_' num2str(i-1) '.txt']); end
11 hours ago | 0
Is there a more efficient way to format my vector rather than manually change the code
TV =@(tme) [tme(1):30:tme(2)-30, tme(2):15:tme(3)-15, tme(3):12:tme(4)-12,... tme(4):2.4:tme(5)-2.4, tme(5):2.1428:tme(6)-2...
12 hours ago | 0
| accepted
How to plot a data in spherical coordinates?
[x,y,z]=sph2cart(th,conc,r); surf(x,y,z);
12 hours ago | 0
How can I make these few lines a function?
function graphSetup() set(gca,'color',[1 1 1]); set(gcf,'Position',[-2237,65,2084,1272],'Resize','on'); box on; set(...
12 hours ago | 1
| accepted
Solved
Count estrangements
Recently I made a puzzle for my wife that included a cryptogram, which involves an arrangement of the letters A through Z. I use...
1 day ago
Solved
Chain multiplication - 03
Following up the problem in 55305, you found the minimum number of multiplications needed to multiply a chain of matrices. In ...
1 day ago
I want to subset values in a table based on a range of numbers specific to one of my variables.
W=randi(500,100,1); A=randi(500,100,1); M=[W(W>=400&W<+450),A(W>=400&W<+450)]
1 day ago | 0
Only applying a "for" command on half of the matrices in it
m=randi(10,10,10,60);%generate your matrix (should store as 3-D matrix) r=randperm(60,30);%generate the 30 affected matrices f...
1 day ago | 0
Solved
Chain multiplication - 02
Following up on the problem in 55295, you found the number of multiplications needed to multiply two matrices. Now, you are giv...
1 day ago
Solved
Cut the rod
A rod of length n can be cut in different sizes. Different price is associated with different length of cuts. length, len= [1,...
1 day ago
Solved
Number of leaps in binary search
Binary search is one of the most popular searching algorithms (Binary Search Algorithm). It works only in a sorted array. It uti...
1 day ago
Solved
Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...
1 day ago
Solved
Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...
2 days ago
Write a MATLAB script to find the sum of all prime numbers between 1 and 500
sum(primes(500))
3 days ago | 0
How to convert character column to 4 byte (total 32 bits) data?
dec2bin(15226547,32)-'0'
5 days ago | 0
Extract specific rows and columns from excel and store in a matrix
If formating is consistent, readmatrix should work. listing=dir; M=[]; for k=1:length(listing) m=readmatrix(listing(k)....
5 days ago | 0
I want to create a binary matrix with a variable dimensions
k=10; M=50; O=randi(M+1,k)-1;%number of ones per row (number of zeros per row= 50 - O) for n=1:k m=[ones(1,O(n)),zeros(1...
5 days ago | 0
Combination of 2 image
idx=find(B(:,:,1)~=0&B(:,:,2)~=0&B(:,:,3)~=0);%find ~black pixels in image B C=B; C(idx)=A(:,:,idx);%set ~black pixels to imag...
5 days ago | 0
| accepted
Match numbers to allocate text
Your could also use a sparse array or an array of nan. x=[12 13 19 21]; y=[12 13 19 24 21 12 12]; X=nan(1,25); X(x)='ABCD'; ...
9 days ago | 0
How to find x value for a known y in array plot?
[~,idx]=min(abs(y-.8*max(y)));%.8*max(y) is not part of the y-array, find the closest y-idx to that value x(idx)
9 days ago | 0
Solved
Rule of mixtures (composites) - weighted bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...
13 days ago
Solved
Rule of mixtures (composites) - lower and upper bounds (volumes)
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...
13 days ago
Solved
Get ranks of values in a vector
For a given vector, say [6 3 8 2], return the ranks (ascending) of observations, i.e. [3 2 4 1]. Do not worry about tied ranks. ...
13 days ago
Solved
Handle to an array of functions
Given a cell array of functions that operate on scalars, it is required to return a function handle to process a vector of value...
13 days ago
Solved
Apply a function array to an array of numbers
It is required to apply a cell array of functions to a numerical array, where the functions accept only scalar inputs. Exampl...
13 days ago
Solved
Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor
13 days ago
Solved
Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...
13 days ago
Solved
Define the operators of function_handles
Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g. e.g. if f = @(x)x and g = @(x)x+1 ...
13 days ago
Hello, I need help with: Replace elements in Vector A with those of vector B of the same position, only if they meet a certain condition, otherwise replace by a zero. Thanks
t=4; A = [3 7 1 3 10 3 4 1 5 5]; B = [5 3 6 1 6 3 5 4 9 ...
13 days ago | 0