답변 있음

Interpolation is wrong?

Here is the corrected code: x=dep_cal2012; y=wc_average; ix = linspace(1, max(x), numel(y)); WC_interp = interp1(ix, y, x,'ne...

Interpolation is wrong?

Here is the corrected code: x=dep_cal2012; y=wc_average; ix = linspace(1, max(x), numel(y)); WC_interp = interp1(ix, y, x,'ne...

2달 전 | 0

답변 있음

Help to transform math formula to matlab

Using the vectorization: format long m=5; jj=1:m; XSum1 = sum(log(jj).*exp(jj.^2)) % Or alternatively Xs = log(jj).*exp(...

Help to transform math formula to matlab

Using the vectorization: format long m=5; jj=1:m; XSum1 = sum(log(jj).*exp(jj.^2)) % Or alternatively Xs = log(jj).*exp(...

2달 전 | 0

답변 있음

Why Does "clear all" Impact Prior Commands in a Script?

In such cases, it is best to use: clearvars instead of clear all

Why Does "clear all" Impact Prior Commands in a Script?

In such cases, it is best to use: clearvars instead of clear all

2달 전 | 0

답변 있음

How to solve laplace transform for ODE with initial value condition

Here is the corrected code: syms t s y(t) Y(s) Dy = diff(y,t); EQN = t*Dy+y== cos(t); LT = laplace(EQN, t, s); LT = su...

How to solve laplace transform for ODE with initial value condition

Here is the corrected code: syms t s y(t) Y(s) Dy = diff(y,t); EQN = t*Dy+y== cos(t); LT = laplace(EQN, t, s); LT = su...

2달 전 | 0

답변 있음

I have to find the local minima and maxima corresponding to the "peaks" and "valleys" of a data file.

Have you worked with fminsearch() fcn of optimization toolbox: https://www.mathworks.com/help/matlab/ref/fminsearch.html

I have to find the local minima and maxima corresponding to the "peaks" and "valleys" of a data file.

Have you worked with fminsearch() fcn of optimization toolbox: https://www.mathworks.com/help/matlab/ref/fminsearch.html

2달 전 | 0

답변 있음

How can I use Lorenz Attractor code?

You simulated the code incorrectly. Here is how you should run the code in one m-file: ICs=[5, 5, 5]; % Your data t=[0, 20]; ...

How can I use Lorenz Attractor code?

You simulated the code incorrectly. Here is how you should run the code in one m-file: ICs=[5, 5, 5]; % Your data t=[0, 20]; ...

2달 전 | 0

답변 있음

How can I make my ODE system run faster

Use a variable step solver instead of the fixed step, e.g.: options = odeset('mass',BigM,'MassSingular','no','BDF','on','MaxOr...

How can I make my ODE system run faster

Use a variable step solver instead of the fixed step, e.g.: options = odeset('mass',BigM,'MassSingular','no','BDF','on','MaxOr...

2달 전 | 0

답변 있음

Import Data Fails to open excel file

Use readmatrix() or readtable() which are much more efficient and faster than uiimport() or importdata() fcns that you have used...

Import Data Fails to open excel file

Use readmatrix() or readtable() which are much more efficient and faster than uiimport() or importdata() fcns that you have used...

2달 전 | 0

질문

How to combine two profiles

Hello MATHWORKS staff, Could you please post a procedure how to combine two different mathworks profiles into one? Thanks mu...

2달 전 | 답변 수: 0 | 0

답변 있음

How to plot graph with multiple values of x in a function

You may also consider to display a legend showing the number of x values taken for calc and plot in every iteration: count=0; ...

How to plot graph with multiple values of x in a function

You may also consider to display a legend showing the number of x values taken for calc and plot in every iteration: count=0; ...

2달 전 | 1

답변 있음

How to plot graph with multiple values of x in a function

A small (but crucial) err that is elementwise operation needed, e.g.: count=0; for i=[3,5,7,10,20,100] count=count+1; ...

How to plot graph with multiple values of x in a function

A small (but crucial) err that is elementwise operation needed, e.g.: count=0; for i=[3,5,7,10,20,100] count=count+1; ...

2달 전 | 1

답변 있음

how can i fit curve for transfer function

Laplace transform (LT) formulation is already an anaytical form solution and if you would like to get a new fit (rational polyno...

how can i fit curve for transfer function

Laplace transform (LT) formulation is already an anaytical form solution and if you would like to get a new fit (rational polyno...

2달 전 | 0

답변 있음

How to save/store/recuparate data from inside a nested loop.

This can be done: for X=1:N_aoa initial=[0;aoa(X);0;0]; Y=[initial,zeros(4,N)]; for n=1:N ... %Stuff happens here ...

How to save/store/recuparate data from inside a nested loop.

This can be done: for X=1:N_aoa initial=[0;aoa(X);0;0]; Y=[initial,zeros(4,N)]; for n=1:N ... %Stuff happens here ...

2달 전 | 0

답변 있음

How to plot values at particular column or row in a 2D matrix

% A is 1024 - by - 256 plot(A(:,250))

How to plot values at particular column or row in a 2D matrix

% A is 1024 - by - 256 plot(A(:,250))

2달 전 | 0

| 수락됨

해결됨

Change the sign of even index entries of the reversed vector

change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

2달 전

답변 있음

Pasteing texts in Matlab script is not working

Restart your computer and install any updates of your computer's OS. It should resolve the issue.

Pasteing texts in Matlab script is not working

Restart your computer and install any updates of your computer's OS. It should resolve the issue.

2달 전 | 0

| 수락됨

답변 있음

fmincon error occurs without details in Matlab

It is working ok. clearvars;clc; lb = [0, 0]; ub = [1, 1]; A = [1 1]; B = 1; Aeq = []; Beq = []; x0=[0.5, 0.5]; ...

fmincon error occurs without details in Matlab

It is working ok. clearvars;clc; lb = [0, 0]; ub = [1, 1]; A = [1 1]; B = 1; Aeq = []; Beq = []; x0=[0.5, 0.5]; ...

2달 전 | 0

답변 있음

Combine data from 3 tables based on common datetime?

Here innerjoin does not work. It is better to employ a logical indexing approach, e.g.: % D1 is a first table array variable an...

Combine data from 3 tables based on common datetime?

Here innerjoin does not work. It is better to employ a logical indexing approach, e.g.: % D1 is a first table array variable an...

2달 전 | 0

답변 있음

How to read data from excel to a cell?

You can get the data from *.xlsx with a few different data import fcns of matlab. Here are two most recommended data import fcns...

How to read data from excel to a cell?

You can get the data from *.xlsx with a few different data import fcns of matlab. Here are two most recommended data import fcns...

2달 전 | 0

답변 있음

Why do i get a empty matrix as a result?

There are a few errs (where the parameters are defined and how the output variable dv() is defined) in defining the function fil...

Why do i get a empty matrix as a result?

There are a few errs (where the parameters are defined and how the output variable dv() is defined) in defining the function fil...

2달 전 | 0

답변 있음

How do I minimize a function graphically?

In your code, your variables are x1 and x2 and NOT x. Moreover, g1 and g2 are incorrectly defined. In this exercise, you shoul...

How do I minimize a function graphically?

In your code, your variables are x1 and x2 and NOT x. Moreover, g1 and g2 are incorrectly defined. In this exercise, you shoul...

2달 전 | 0

답변 있음

How can I simulate a resource allocation?

According to what you have stated in your exercise description and understood, this code can be written: D = load('detected.mat...

How can I simulate a resource allocation?

According to what you have stated in your exercise description and understood, this code can be written: D = load('detected.mat...

2달 전 | 0

답변 있음

accuracy test higher than training

You can try to employ random selection of the data for training and validation using randperm() or randsample(), for example. A...

accuracy test higher than training

You can try to employ random selection of the data for training and validation using randperm() or randsample(), for example. A...

2달 전 | 0

답변 있음

FOR LOOP ERROR IN MATLAB

[for end] loop is working perfectly ok, but there is an error in your defined function's input arguments. See the corrections: ...

FOR LOOP ERROR IN MATLAB

[for end] loop is working perfectly ok, but there is an error in your defined function's input arguments. See the corrections: ...

2달 전 | 0

답변 있음

Trying to solve equations within ranges

One of the viable solutions is to use symbolic math: syms and solve. clearvars; clc x1=-2; x2=2; y1=-2.1; y2=2.1; x = x1:0.1...

Trying to solve equations within ranges

One of the viable solutions is to use symbolic math: syms and solve. clearvars; clc x1=-2; x2=2; y1=-2.1; y2=2.1; x = x1:0.1...

2달 전 | 0

| 수락됨

답변 있음

adding column ( cell) to matrix

x = (1:5).'; % Vector F1 = categorical({'A'; 'B'; 'C'; 'D'; 'E'}); % Cell Categorical Array F2 = ...

adding column ( cell) to matrix

x = (1:5).'; % Vector F1 = categorical({'A'; 'B'; 'C'; 'D'; 'E'}); % Cell Categorical Array F2 = ...

2달 전 | 0

답변 있음

How do I estimation of the means of a random variable?

% lower and upper bounds of the Uniform random variable X: a= 0; b = 2; % True values of the mean and variance of X: m = (b-...

How do I estimation of the means of a random variable?

% lower and upper bounds of the Uniform random variable X: a= 0; b = 2; % True values of the mean and variance of X: m = (b-...

2달 전 | 0

| 수락됨

답변 있음

How to retrieve the index of positions starting with a specific character in a cell array?

x1 = 5000; x2 = 3000; x3 = 1000; x4 = 800; x5 = 500; array1 = ([x1,x2,x3,x4,x5]).'; array2 = categorical({'A1';'A2';'B1'...

How to retrieve the index of positions starting with a specific character in a cell array?

x1 = 5000; x2 = 3000; x3 = 1000; x4 = 800; x5 = 500; array1 = ([x1,x2,x3,x4,x5]).'; array2 = categorical({'A1';'A2';'B1'...

2달 전 | 0

답변 있음

adding column ( cell) to matrix

WHat you are trying to do is to augment all variables into one array, correct? In this case, table array might be a good one, e....

adding column ( cell) to matrix

WHat you are trying to do is to augment all variables into one array, correct? In this case, table array might be a good one, e....

2달 전 | 0

답변 있음

How do I estimation of the means of a random variable?

In order to generate a normally distributed random numbers, you can employ clc; clearvars; close all Npop = 7.5e2; ...

How do I estimation of the means of a random variable?

In order to generate a normally distributed random numbers, you can employ clc; clearvars; close all Npop = 7.5e2; ...

2달 전 | 0