Community Profile

photo

David Hill


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

담당자

David Hill's 배지

  • Guiding Light
  • 6 Month Streak
  • Knowledgeable Level 4
  • Indexing II Master
  • Sequences And Series III Master
  • Puzzler
  • 5-Star Galaxy Level 2
  • Personal Best Downloads Level 3
  • First Review
  • Scholar
  • First Submission
  • Revival Level 1
  • Creator
  • Leader
  • Computational Geometry II Master

모두 보기

참여 게시물
보기 기준

답변 있음
I have to find the sum of the elements in the upper dimension matrix and this is the code i came up with. When I submitted this code it's showing error.
Why not just: [a,b]=size(A); if a==b summa=sum(triu(A),'all'); end

약 1시간 전 | 0

답변 있음
create coordination matrix from zig zag path
x=0:9;%xend odd only y=[0;410;410;0]; A=[repelem(x',2),repmat(y,(x(end)+1)/2,1)];

약 4시간 전 | 0

| 수락됨

답변 있음
How to represent a set of matrices into a single cell?
I would keep them all in a single matrix and then form matrix E (a*b X 4) where each row would hold the cell information of your...

1일 전 | 1

답변 있음
Calculating Harmonic Average in Matlab Function
What is ky? Why not just perform vectorized? No need to index into k. k can be any length vector and the below will calculate th...

2일 전 | 0

답변 있음
How to calculate the jumper's final distance on this problem?
function dist=BJump(v,theta,rho,s) x=0; g=9.81; c=.72; dt=.000001;%not sure how accurate you need y=v*s...

3일 전 | 0

| 수락됨

답변 있음
Remove array values with multiple occurances from "parent" array
a = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]; b = [1, 1, 2, 4, 4, 4]; c = a; for i=b c(find(c==i,1))=[]; end

5일 전 | 0

| 수락됨

답변 있음
Sum of a Series, Help!
Not sure exactly what you are asking. x=0:.1:10; for n=1:3 S(n,:)=arrayfun(@(i)sum(repmat(-1,1,n+1).^(0:n)./(2*(0:n)+1).*...

5일 전 | 0

답변 있음
Finding equal values in two matrices and create a new matrix
A1 = importdata('Particles.txt'); A2 = importdata('Fragments.txt'); ID_Particles = A1(:,2); MID_Fragments = A2(:,6); CooPart...

6일 전 | 0

| 수락됨

답변 있음
Bit xor of two binary strings and conversion into decimal
Use java BigInteger import java.math.*; a=BigInteger(str1,2); b=BigInteger(str2,2); c=a.xor(b);%c will be the decimal BigInt...

25일 전 | 0

답변 있음
Replacing row in matrix with previous row depending on condition
If you have consecutive rows containing -2, you will have to repeat until all the -2 rows have been replaced if that is your goa...

25일 전 | 1

답변 있음
How do I replace values in a 400x400 matrix with values of 1x1001 array (r) and then replace all r <= 0.02 with 1 and r>0.02 with 0?
r=.0001:.0001:.1001; k=randi(1001,400);%I assumne you want randomly generated m=r(k); M=zeros(400); M(m<=.02)=1; M(m>.02)=0...

25일 전 | 0

| 수락됨

답변 있음
How to solve Index in position 1 exceeds array bounds (must not exceed 1).
You could always store it as a vector in the size you need it. p0_A_SOEC_INIT_out=p0_A_SOEC_INIT_out*ones(1,size_you_need);

25일 전 | 0

| 수락됨

답변 있음
Array \ Matrix Output display formating
You could also round(x, 3) and use format shortG format shortG; syms phi M=exp(pi*tand(phi))*(tand(45+phi/2))^2; phi=10:0.5:...

26일 전 | 1

| 수락됨

답변 있음
Extract rows in a Matrix based on column values of another Matrix.
count=1; for k=p a=find(q(:,1)==k);%assume there is only one match if ~isempty(a) newMatrix(count,:)=q(a,:);...

26일 전 | 0

답변 있음
slopes of a graph
Derivative of the data provide the slope. You could fit the data first before taking the derivative. You will have to decide. s...

26일 전 | 0

답변 있음
Why doesn´t it stop the loop?
use break instead. You should never try to change the loop variable. break;

26일 전 | 1

| 수락됨

답변 있음
Reshaping a complex 3D array into 1D, and back
1dwave=3dwave(:)'; recovered_wave=reshape(1dwave,size(3dwave));

26일 전 | 0

답변 있음
how to write this
If u and t are just scalar 9*u*(t-2); If u and t are arrays or matrices of the same size 9*u.*(t-2);

26일 전 | 0

답변 있음
Double interpolation using lookup tables in matlab
[x,y]=meshgrid(25:5:50,-10:5:15); z=[59 76 91 107 122 137;78 98 116 133 149 164;101 127 148 167 184 197;127 155 177 197 214 227...

26일 전 | 0

| 수락됨

답변 있음
creating a signal without an IF statement
signal(find(fastMA>slowMA & rsi10mins < 65,1):find(fastMA<slowMA & rsi10mins > 35,1)-1) = 1;

26일 전 | 0

답변 있음
using nested loop function to create a matrix
You can watch the 1's being filled in: s=10; H=zeros(s); J=zeros(s); for k=1:s for m=1:s H(k,m)=1;%simple doub...

26일 전 | 0

| 수락됨

답변 있음
Create Symbolic functions with existing function file
It should work, you just need to pass a symbolic z to the function. It would help in the future if you created code that we coul...

27일 전 | 0

| 수락됨

답변 있음
Random display of 1 out of several images
You could read all the images into a cell array (each image in an element), then: for k=1:8 imageCell{k}=imread([num2str(k...

27일 전 | 1

| 수락됨

답변 있음
The following error occurred converting from sym to double: Unable to convert expression into double array.
Do you have to perform symbolically? Does not look like the integral exists. Why not numerically? function f= myf2(w,k) dfm =@...

27일 전 | 0

| 수락됨

답변 있음
Creating a Bell Curve of Data
Just looking at your data, histogram() function is useful. histogram(tmax01,30);%however many bins you want You could overlay:...

27일 전 | 0

| 수락됨

답변 있음
Help with Viewing Table Contents
It is a .m file. All you have to do is: load('FloObsWindTable'); It will be in your work space. Double click on it and navigat...

27일 전 | 0

| 수락됨

답변 있음
Numerical Differentiation that returns column vector
If the time interval is constant (.005 between readings), it should be as simple as: thetadot=diff(theta1inv)/.005; You will g...

27일 전 | 0

답변 있음
readmatrix is truncating and moving decimal
Are you sure there is not a times 1e5 somewhere before the matrix is displayed. The numbers are likely the same but the format i...

27일 전 | 1

답변 있음
Adding Zero to the first index of an array
Result=[0 A];

27일 전 | 0

해결됨


Basics - not so easy division
Please make a function whcih divides x/y, but pay attention for some exceptions with NaN,0,Inf. Sometimes return "ERROR" instead...

28일 전

Load more