Community Profile

# David Hill

##### Last seen: Today
1,461 2017 이후 총 참여 횟수

#### David Hill's 배지

모두 보기

참여 게시물
보기 기준

답변 있음
Solve system of equations where variables are xby1 column
x=A\b%where A is matrix of coefficients and b is a column vector of answers

약 5시간 전 | 0

답변 있음
Matlab Solve a system of equations for a set of data
You could just solve Ax=b (A\b): E=73*10^9; v=0.33; ey28=-1*10^-6; ex28=-3*10^-6; b=[v*E*(ex28+ey28)/(1+v)/(1-2*v)+E*ex28/...

약 6시간 전 | 0

답변 있음
Why I get ans = logical 1
Much easier way: A=normrnd(0,1,[100,1]); [~,~,a]=histcounts(A,[-10,-.9957,0,.9957,10]); b=[-1.493;-0.497;0.497;1.493]; Aq=b(...

약 9시간 전 | 0

답변 있음
I am not sure how to do this coding, can you please help!!
b = 3500; Balance=3500; r = 1.06; rr=1.05; for i = 1:30 Balance = Balance*r+b*rr^i; end

약 10시간 전 | 1

답변 있음
Read a column as numbers
This works just fine for me. data=readmatrix('Data.csv');

약 12시간 전 | 0

답변 있음
double loop formation question
for j=1:52 jj=j; for i = 1:30 depth_week_j(:,:,i) = GWdepth(:,:,jj); jj = jj + 52; end me...

약 14시간 전 | 0

답변 있음
Value dependant sort of matrix rows
sorted_M8=M8'; sorted_M8(ismember(M8',8))=M8(:,1); sorted_M8=sorted_M8'; sorted_M8(:,1)=8;

약 14시간 전 | 0

| 수락됨

답변 있음
Need help with plotting a complicated for loop
function y=f(x) for i=x if i>2 y=x.^2;%you are reassigning y every iteration, your y will be ...

1일 전 | 0

답변 있음
How can I eliminate the NaN?
x = input('Angle in Radians:'); d=cos(x); f=1; difference = d - f; difference = abs(difference); threshold = .0001; n = 0;...

1일 전 | 0

| 수락됨

답변 있음
Typing a long and complicated equation
z=@(y)2*pi*(sqrt((44.56-y)/.16)+1).*sqrt(1+(1./(.32-.32*(sqrt((44.56-y)/.16)+1))).^2); y=0:.01:10;%have no idea what you are in...

1일 전 | 0

답변 있음
For loop for this ?
A simple matrix would work much better. Vcd=125*(ones(3,10).*[1.2,1.3,1.4]').^(1:10);%this is 10 years, each column with the di...

1일 전 | 0

답변 있음
bisection method with log
Once you graph your function, you see there are 4 roots. Using the bisection method to find the numerical roots should now be ea...

1일 전 | 0

답변 있음
How do put the values within a cell in a matrix?
dff1=wholedff{1}; dff2=wholedff{2}; ... but why would you want to do that? That is why we do indexing so we do not have to ha...

1일 전 | 0

답변 있음
Simpson's 1/3 Rule Implementation Issue (Code Provided)
The following function might help. function o = simp(a,b,f,n) x=linspace(b,a,n+1); o=0; for k=1:n xx=[x(k);(x(k)+x(k+1)...

2일 전 | 0

답변 있음
Setting variable names inside function based on input arguement in MATLAB
function ans=testNum(z) str = ''; NaN; while isnan(ans) input([str, 'Enter a value for ',z,': ']); ...

2일 전 | 0

| 수락됨

해결됨

ZigZag - 01
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3; 4,5,6; 7,8,9] ...

2일 전

해결됨

Seconds
Given the number of seconds after 12 am, find the time in the given format (12/24). If the format is not mentioned, use 24-ho...

2일 전

답변 있음
Are there any functions that will return the index of the last string in a cell of strings?
find(ismember(cell,'a'),1,'last');

2일 전 | 1

| 수락됨

답변 있음
Symbolic solution to a system of equations
syms a; [1,-1;2,-1]\[a;0];

2일 전 | 0

답변 있음
How can I add a column of data to a matrix
A1=[A1;b1];

2일 전 | 0

답변 있음
How do I call a script inside a function?
Why not just use functions? I only use scripts when I am working in the workspace. Unless you are going to call a function more ...

3일 전 | 0

답변 있음
Applying a string of user inputs within a while-loop
Recommend breaking while loop with if statement: while 1 angle=input(['Enter the angle of trajectory [degrees] : ']); ...

3일 전 | 1

답변 있음
Matrix dimensions must agree
Several problems I have noticed: a = 0.4; f = 10^6; w = 2*pi*f;%scalar no need for . I0 = 1; b = (0.4/2); mu0 = 4 * pi * 1...

3일 전 | 0

답변 있음
Sorting a large 3 column data set
If I understand you correctly, can you not just subtract off a constant from both x and y coordinates to reset them to where you...

3일 전 | 0

| 수락됨

답변 있음
How can i get the trigonometric function of cos and sin of a variable
Why are the users not entering numbers instead of character arrays? T1 = input('Introduce the value of Theta for row 1 = ');

3일 전 | 0

답변 있음
The kinetic energy of a moving car object is KE=1/2mv^2
function energy = KE(m,v) energy= %put your code here end

3일 전 | 0

| 수락됨

답변 있음
Functions and For Loops For Polynomials
Too bad you can't use polyval(). This might get you started. function e=evalPoly(p,a) x=1; e=0; for k=1:length(p) e=e+p...

3일 전 | 0

답변 있음
consider preallocating for speed
No for-loop needed. No preallocation needed here. theta_2=1:360; th_2=theta_2*pi/180;%you could use cosd() and not need to con...

4일 전 | 0

답변 있음
How would I divide a 206x1 double it into 5 equal sections and average the values
I am not exactly sure what you mean. If you have matrix (M -206x1) and you want to find the mean of different groupings, then: ...

4일 전 | 0

해결됨

Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

4일 전

Load more