Community Profile

photo

David Hill


Last seen: Today
3,484 total contributions since 2017

Contact

David Hill's Badges

  • Revival Level 2
  • 12 Month Streak
  • Guiding Light
  • Famous
  • Matrix Manipulation I Master
  • Indexing II Master
  • 5-Star Galaxy Level 3
  • Personal Best Downloads Level 3
  • First Review
  • Sequences And Series III Master
  • Knowledgeable Level 4
  • Puzzler
  • Scholar
  • First Submission
  • Creator

View all

Contributions in
View by

Answered
How to import specific columns from multiple text files into a single numeric array?
newFile=[]; for k=1:5 a=readmatrix(sprintf('yourFile%d.txt',k));%name files consistently with number at end newFile=[...

19 hours ago | 0

Solved


RSA encryption using public key
Encrypt the message text by converting to uint8 matrix using UTF-8 representation. Convert uint8 matrix to a large integer strin...

22 hours ago

Answered
Using while loop: Unable to obtain value
The code is working properly. If you enter a negative number or zero, the code prompts you to reenter a correct value.

22 hours ago | 0

| accepted

Answered
How to Integrate TWO times separately over different unknown parameters (THREE integrals in total) and come up with numerical result? My simulation is endless.
I would try something like: syms phi d v; A=vpaintegral(3*exp(-2.5e-7*v^2-4.53)*besselj(0,.3*v)*v*... (exp(vpaintegral(vp...

23 hours ago | 0

Answered
Probability HW Need help
head=1, tails=0. This should give you a good start. a=randi(2,5,10)-1; results=sum(a); b=randi(2,5,1000)-1; results2=sum(b);...

24 hours ago | 0

Answered
How do I overlap 2 images in matlab?
Assuming the pictures are rgb matrixes. picture2=reshape(picture2,[],3); idx=ismember(picture2,[0 0 0],'rows');%find the black...

1 day ago | 0

Answered
change the dimension of a cell in a cell array
for k=1:length(XTrain) XTrain{k}=reshape(XTrain{k},6,[]); end

1 day ago | 1

| accepted

Answered
Assign specific index to a matrix
x=[A,x];

1 day ago | 0

Answered
plotting graph using table data
a=readmatrix('energy lab Exp 1.xlsx'); plot(a(:,1),a(:,2));

1 day ago | 0

| accepted

Answered
How to make a for loop add results together consecutively?
No loop is needed assuming your acceleration values are in an array. v=0:16; t=1./a; plot(cumsum(t),v);

1 day ago | 0

| accepted

Submitted


Secure Off-line Email Encryption GUI
Send and receive off-line encrypted emails using public-key cryptography and Advanced Encryption Standard (AES).

2 days ago | 10 downloads |

Thumbnail

Submitted


AES-256 GUI using CBC mode
Advance Encryption Standard-256 encryption and decryption in a GUI. The Cipher Block Chaining (CBC) mode is used with cipher-tex...

2 days ago | 15 downloads |

Thumbnail

Submitted


Advanced Encryption Standard (AES)-128,192, 256
Advance Encryption Standard-128, 192, or 256 encryption and decryption using 128/192/256-bit hexadecimal key and 128-bit hexadec...

2 days ago | 61 downloads |

Thumbnail

Answered
Capitalize only the first letter of a character
Likely a better way. a='my name'; a(1)=upper(a(1));

2 days ago | 0

| accepted

Answered
How do i build a matrix asking the user for inputs?
If allowed, I would build the entire matrix with one input. yourMatrix=input('Input your matrix in the given format, for exampl...

6 days ago | 0

Answered
How can do this?
c=1; while 1 n(c)=input('Enter positive number'); if n(c)<0 n=n(1:end-1); break; end c=c+1; end fpr...

6 days ago | 0

Answered
Multiplication of 2 sets to get all possible outcomes
a = 0:0.01:0.2; b = 0:pi/12:pi; [A,B]=meshgrid(a,sin(b)); C=A.*B; c=unique(C(:)');%if you only want unique outcomes.

6 days ago | 0

| accepted

Answered
How to compute the sum term ?
alpha = 0.6; U(1)=1;%you need to specify U(1) and U(2) U(2)=.5; S=2^(1-alpha)*(U(1)-U(2)); U(3)=(U(2)+S)/2; for n=3:50 ...

6 days ago | 0

| accepted

Answered
Displaying all elements of a matrix less than -50
e=M(M<-50)

7 days ago | 0

| accepted

Answered
How can I fix this Infinite While loop?
a = 12; b = 13000; x = .2004/a % Interest payment = 700;%I assume you want a constant payment until the last payment count=...

9 days ago | 0

Answered
Why can't I calculate the definite integral?
F=vpa(F)

9 days ago | 0

| accepted

Answered
creating a matrix from 2 vectors and a function loop
[wheel_radius,nozzle_radius]=meshgrid(.12:.02:.3,.002:.001:.01); for k=1:numel(wheel_radius) power_output(k)=waterwheel_ge...

9 days ago | 0

| accepted

Answered
Could someone explain this straight line function?
It is point-slope form of a line. If the points are a=[x2, y2] and b=[x1, y1], then: m=(a(2)-b(2))/(a(1)-b(1));%slope func =@(...

13 days ago | 0

Answered
How can I move the bars in a bar chart?
figure; bar_displacement=.25;%play with this until it is correct bar(x-bar_displacement,y); set(gca,'XTick', x);

15 days ago | 0

Answered
ignore NaN values in loop
CC=[]; for i = 2:16 A = walknov(:,i); A = interpft(A(~isnan(A)), 100); if isempty(A) CC=[CC;nan(1,100)]; ...

15 days ago | 0

Answered
using for loop plotting problem help me
What are you trying to plot? f= @(x) 3*x.^5+7*sin(x).^2;%I doubt you want sind fd= @(x) 15*x.^4+7*sin(2*x).^2+3*x.^5+7*sin(x)...

15 days ago | 0

Answered
Conditional statements on array.
i=reshape(Input,12,[])'>100; Output=zeros(size(i)); for k=1:size(i,1) if nnz(i(k,:))>0 Output(k,:)=1; end ...

15 days ago | 1

Answered
what it does mean?
If the matrix 'index' indexed at (1,1) equals 1, then assign S1 =0 and S2 = 0. if index(1,1)==1 S1=0; S2=1; end

15 days ago | 0

Answered
for loop issue not all answer printing out
function T = InterestPayment(P,r) for n=1:10 A(n) = P*((r*(1+r)^n)/((1+r)^n-1)); end T= table ((1:10)',A', 'VariableN...

16 days ago | 0

Answered
How can I find the nonzero values in an cells array?.
Non_ceros=zeros(length(Index)); for i = 1 : length(Index) for j = 1 : length(Index) Non_ceros(i,j) = nnz(In...

16 days ago | 0

| accepted

Load more