Risposto
How do i write the code of lagrange multiplier in lagrange function?
Hi, here is an example, which you can use to learn how you can tackle this problem in Matlab: https://de.mathworks.com/matlabc...

oltre 7 anni fa | 1

| accettato

Risposto
Curve Fitting using normal equations formulation of least squares
A = [20 40 60 80 100 120 140 160]; A = [A' ones(numel(A),1)]; b = [13 22 30 36 40 43 45 46]'; x = A\b; fprintf('y = %.5f + %...

oltre 7 anni fa | 1

Risposto
Parsing a text file
Hi, use readtable like suggested by Madhan. If it is always in column 8 of your data like your example given use logical indexi...

oltre 7 anni fa | 1

| accettato

Risposto
How to find the jacobian of the system of nonlinear equations?
Hi,. try: syms x1 x2 x3 h=4; gma=18.4; ka1=0.2; kp1=8.76 ka2=0.2; kp2=8.76; sindel=0.437; cosdel=0.9; pa1=ka1*gma*(h*...

oltre 7 anni fa | 0

| accettato

Risposto
CHANGE X AXES SCALE
xlim([0 25])

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

Risposto
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

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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...

oltre 7 anni fa | 2

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Inviato


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

oltre 7 anni fa | 90 download |

0.0 / 5

Risposto
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('...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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 ...

oltre 7 anni fa | 0

| accettato

Risposto
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)))

oltre 7 anni fa | 1

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

oltre 7 anni fa | 1

Risposto
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...

oltre 7 anni fa | 1

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

Risposto
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]

oltre 7 anni fa | 0

Risposto
'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)./(...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 1

Risposto
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*...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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: ...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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

oltre 7 anni fa | 0

Risposto
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); ...

oltre 7 anni fa | 0

| accettato

Carica altro