Community Profile

photo

Stephan


581 total contributions since 2017

Knowledge means knowing where it is written...

Interested in:
- Optimization
- Mathematical Modelling
- Improvement of my programming skills

Contact

Stephan's Badges

  • Thankful Level 2
  • 6 Month Streak
  • Knowledgeable Level 4
  • Pro
  • Revival Level 3
  • Speed Demon
  • Creator
  • First Answer
  • Commenter
  • Promoter
  • Solver

View details...

Contributions in
View by

Answered
Does Matlab R2018b will receive updates of R2019a
Hi, usually you get 1 year service additionally to all the toolboxes you buy and Matlab. That means, if you buy today, that you...

4 hours ago | 1

Answered
How can I code 1-D heat conduction PDE using implicit finite difference method?
Hi, you could use the built in function pdepe. Best regards Stephan

4 hours ago | 0

Answered
I want to combine two anon functions, p(h) and t(p) and plot them against each other
Hi, the following code substitutes p in the equation for T with the expression from the first equation and creates a function h...

16 hours ago | 0

Answered
Mismatch between file and format string.
Hi, use readtable, then extract the data from the variable CLOSE (=column named CLOSE) in ascending order: data = readtable('s...

18 hours ago | 1

| accepted

Answered
MACD(50, 90,9)
Hi, with a little effort it should be possible to write your own MACD. The movavg function supports an exponential type as opti...

18 hours ago | 0

Submitted


MACDflex
Flexible version of the known MACD trend indicator. Set your own periods for the short, the long and the signal period to calcul...

18 hours ago | 1 download |

Answered
Solve system of 3 variable equations
Hi, since you want to calculate values, follow Torstens suggestion and use fsolve to solve your nonlinear system: X1 = input('...

22 hours ago | 0

Answered
Error using xlsread (line 132) File name must be a character vector. Error in Lab1 (line 8) trial_data1= xlsread(Raw_Data(i),1);
Hi, since Raw_data is a cell array use {i} to get the content at i in your for loop: trial_data1= xlsread(Raw_Data{i},1); ins...

1 day ago | 0

| accepted

Answered
How to multiply matrices without using operator asterix?
Hi, problably you are looking for: https://de.mathworks.com/help/matlab/matlab_prog/array-vs-matrix-operations.html Best rega...

2 days ago | 0

| accepted

Answered
Rearranging second matrix based on the order of first matrix
A = [1 2 3 4.1; 5 12 7 4.1; 9 10 11 4.1] B = [131 10 11 8.1; 21 12 7 8.1; 91 2 3 8.1]; B_new = sortCols2_3(A,B) function ...

3 days ago | 0

| accepted

Answered
How to put each two elements in a matrix in a cell ?
A= [ 1 2 3 4; 5 6 7 8; 9 10 11 12] A=reshape(A',2,[])'; B = mat2cell(A,ones(1,size(A,1)))

3 days ago | 1

Answered
Contributors metainfo: reputation and more
Congratulations to madhan for reaching MVP status!

3 days ago | 1

Answered
Can someone help me with the Taylor Series ? Can't figure out how to fprintf this in order to show the appox error, true erroe or anything
x = 350; y = 2.567; z = 0.0002; fprintf('x = %d,\ny = %.3f,\nz = %.4f\n',x,y,z) fprintf('x = %d,\ny = %.5f,\nz = %.7f',x,y,z...

4 days ago | 1

Answered
problems_in_using_nominal
Hi, try the following workflow: ver the result should contain ... Statistics and Machine Learning Toolbox Ver...

4 days ago | 0

Answered
Invalid use of operator.
Hi, try: % 1 step: create slice and save resulting img % 2 step: run registation %% create slice and substract dark image ...

4 days ago | 0

Answered
Year in column 1 and month in column 2
col1 = repelem(1901:2017,12)'; col2 = repmat(1:12,1,numel(col1)/12)'; result = [col1 col2]

4 days ago | 0

Answered
'for loop' summation containing symbolic variable
Hi, some bugs - try: clear syms n Cs=1000; k=1e8; D=1e-3; t=linspace(1e-7,1e-5); w2n=(n.^2)*pi^2*D/4; g=((1-(-1).^n)./(...

4 days ago | 0

| accepted

Answered
How to implement optimal control using Pontryagin's Minimum Principle for HESS in EV application as in attached paper?
Hi, there are some examples here on answers, where people used Matlab with Symbolic Math Toolbox to solve this kind of problems...

4 days ago | 0

Answered
Atotal charge Q is uniformly distributed around a ring-shaped conductor with radius a . Acharge q is located at a distance x from the center of the ring .
The following plots your function: syms x e0=8.85e-12; %(C^2/N*m^2) Q=2e-5; %C q=Q; %C a_1=0.9; %m F=(1/(4*pi*e0)) * (q*Q*...

5 days ago | 0

Answered
I have Database with few categories generated from testes, i need to compare the new test data with the data base and identify to which category the new data belongs, is it possible to do this with MATLAB?
Hi, start reading here: https://de.mathworks.com/help/deeplearning/deep-learning-with-time-series-sequences-and-text.html Bes...

5 days ago | 0

Answered
how to calculate the standard deviation for each month in monthly time series data of 46 years?
Hi, the following code reshapes your table the way you want it: load('monthlymeans_ObsData.mat') monthlymeans_ObsData.Propert...

5 days ago | 1

| accepted

Answered
Classification Learner: Not all table variables appear as potential responses
Hi, here is a try for an answer, which i can not prove by a link from the documentation, but which seems to be logical to me: ...

6 days ago | 0

Answered
how to plot monthly means data to show seasonal change over 47 years?
Hi, this is very similar to your other question. Here you can use the rows2vars function, once you have reshaped your table. Th...

6 days ago | 1

| accepted

Answered
Removing NaNs in a struct array
Hi, for a matrix A in R2018b use: A(isnan(A)) = randi(10,1,sum(isnan(A),'all')) Best regards Stephan

7 days ago | 0

Answered
Finding breakpoints for a given 2D Points and their associated time stamps
Hi, see the attached findEdges function: function [px, py] = findEdges(x,y,t,treshold) dx = diff(x); dy = diff(y); ...

7 days ago | 0

| accepted

Answered
Error using ode45. Must return a column vector?
1x20 is not a column vector, but a row vector. transpose it to 20x1.

8 days ago | 0

| accepted

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

8 days ago

Solved


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

8 days ago

Solved


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

8 days ago

Answered
Why I cannot define a function in live script?
Hi, you are right - it is freezed: But there is nothing wrong with this, since you can not run a function which is defined b...

8 days ago | 2

Load more