Community Profile

photo

the cyclist


3,732 2011 年以降の合計貢献数

Data scientist at Cohen Veterans Bioscience; Obsessive runner. Professional Interests: Predictive modeling, statistics.

連絡する

the cyclist's バッジ

  • Scavenger Finisher
  • 36 Month Streak
  • Thankful Level 3
  • Ace
  • Likeable
  • Famous
  • Quiz Master
  • Revival Level 3
  • Knowledgeable Level 4
  • First Answer
  • Puzzler
  • Speed Demon
  • Creator
  • Promoter
  • Commenter

すべて表示

貢献した分野
表示方法

回答済み
Taking middle 4 values of n size array
Here is one way, assuming the number of elements is even: % Input a = rand(8,1); numberElements = numel(a); numberToRemove...

約1時間 前 | 0

回答済み
write a function that takes any equation as an input
Are you familiar with anonymous functions? That would presumably be the best way to pass "any function" as an argument. Then in...

約2時間 前 | 0

回答済み
linearly spacing a nX1 matrix
Your problem is still under-specified, and an infinite number of matrices will meet you conditions. Here is one possible solutio...

約5時間 前 | 0

| 採用済み

回答済み
Find average y value of a range of numbers from a non linear data set
Your example of averaging the values from 6:10 would be mean(interp1(X,Y,6:10,"previous")) Change where I put 6:10 to be the a...

約6時間 前 | 1

回答済み
Index exceeds array bounds from CorrCoeff
The problem is that in the first iteration of your loop, you are taking the correlation of two scalar values: corrcoef(X(1,1),X...

約22時間 前 | 0

回答済み
How to print figure to an .eps file properly?
Try using '-opengl' rather than '-painters' for the renderer.

1日 前 | 0

回答済み
Creating means in a table for a specific subnum
I think you might be able to do what you want using the groupsummary function.

2日 前 | 0

| 採用済み

回答済み
How to print figure to an .eps file properly?
Try using export_fig.

3日 前 | 0

回答済み
How to fit data to a curve with known error bars and draw it?
Do you mean that you want to do a fit where both your x and y variables have known measurement error? (Unlike, say, an ordinary ...

3日 前 | 0

回答済み
Subscript indices must either be real positive integers or logicals.
Unlike some other programming languages (e.g. python), MATLAB has 1-based indexing. The first element of the array A would be re...

3日 前 | 0

回答済み
Printing row index or row of a matrix by searching for a particular value?
rowIndex = find(mat(:,1)==31); % Row index row = mat(mat(:,1)==31,:); % Row Note that one doesn't need the find command to get...

3日 前 | 0

| 採用済み

回答済み
How to plot below function of two variables
x = 0 : 0.02 : 2; % 2 is not equal to infinity, but it shows the behavior. y = 0 : 0.02 : 2; [xx,yy] = meshgrid(x,y); f =...

5日 前 | 0

| 採用済み

回答済み
Relate a value obtained with values that formed it (Vector Relationship)
Assuming those are all numeric vectors of the same length, then [min_SLL,min_idx] = min(SLL); min_dx1 = dx1(min_idx); min_dy1...

6日 前 | 1

| 採用済み

回答済み
How to reshape nested cell arrays in a table
Here is one way: t.Var2 = {reshape(t.Var2{:},4,12)} and analogously for Var3 and Var4. Parsing what that is doing, from the i...

6日 前 | 1

回答済み
How to retrieve data from a website?
According to its documentation page, use of urlread is not recommended. It suggests using webread instead.

6日 前 | 0

回答済み
How to crate only 5 plots out of the 20000 iterations?
Use if mod(k,5000)==0 ... end and just figure or figure(k/5000) Just using the figure command (without any argument)...

7日 前 | 0

| 採用済み

回答済み
lagrangian polynomial function giving the incorrect answer
I don't have a solution for you, but I can say that the line xprod=xprod*((c-Xlist(j))/(Xlist(i)-Xlist(j))); is never reached ...

7日 前 | 1

回答済み
Arrange be in order of their pairing, and count how many times they appear
[C,~,idx] = unique(B,'row'); D = accumarray(idx,A); 1 + 3 + 6 = 10. ;-)

8日 前 | 0

| 採用済み

回答済み
Find a series of consecutive numbers and change index of them
Data(:,1) = cumsum(diff([Data(1,2); Data(:,2)]) ~= 1); will change the first column to what you want. That's might be a bit "o...

8日 前 | 2

| 採用済み

回答済み
while loop mixing number with word
Use a cell array instead: i = 1; a = 5; while (i<10) student{i} = a a=a+5; i = i+1 end See this Answers tuto...

8日 前 | 0

回答済み
Loop not working properly
What you are observing seems correct to me. theta is 0, and phi is constant. This means that even as r increases y is zero (be...

9日 前 | 0

| 採用済み

回答済み
My licensed Mathworks products (Home Use License )
Quoting from my R2019a Home license agreement: A Named User may install the Programs on up to four (4) different Computers but ...

10日 前 | 0

回答済み
How to save Figures using "print" with a filename from a variable?
It's a straightforward extension of what you are doing now. For example k = 1; y = 1989; sprintf('/Users/Figure3/figCI_%d_%d....

11日 前 | 0

| 採用済み

回答済み
Interpolation using scattered query points
I believe the solution you point to can be trivially vectorized: load clown ; imagesc(X); colormap gray ; [nx,ny] = size(X) ...

11日 前 | 0

| 採用済み

回答済み
Finding max value in intervals
Given your nicely separated peaks, I think you could simply use the 'MinPeakDistance' name-value pair, as was done in this examp...

11日 前 | 0

回答済み
Can the following function be optimized further for speed?
The vecnorm function probably does some error- and type-checking which you don't need, and you can combine two square root opera...

11日 前 | 1

| 採用済み

回答済み
How to solve a 5x5 matrix in Matlab?
A\b Take a look at this documentation. Does that do what you want?

12日 前 | 0

回答済み
Changing directories after a function is ran
Depending on exactly how you want to do it, I expect the following command will be useful: ls -- to see the folder contents in...

13日 前 | 0

回答済み
Creating an Array for Different Radial Positions
theta = 0; phi = pi/2; r = 1 : 0.2 : 10; theta = repmat(theta,size(r)); phi = repmat(phi, size(r)); [x,y,z] = sph2...

13日 前 | 0

| 採用済み

回答済み
How do I compare each value and take the average of same number of every comparison in a vector?
Will identical values every be separated from each other? If not, then it seems like you just need unique(A) But this will not...

14日 前 | 0

Load more