Answered
How to generate Pareto front for an external function ?
Use "gamultiobj".

3 years ago | 1

| accepted

Answered
3d implicit function plot with the sign function
MATLAB assumes that the function f you provide is continuous. For x+y+z =1, the function returns -0.1, for all other triples for...

3 years ago | 0

Answered
Array indices must be positive integers or logical values. - specific to EEG data
Rename this variable - it conflicts with MATLAB's "fft" function. fft = 2^nextpow2(57001);

3 years ago | 0

Answered
How to integrate over the entire bounds of a solution to a PDE at a given time step using PDEPE
How can I integrate over the entire geometry to find the total concentration at each time step? Do I have use PDEPE for small st...

3 years ago | 0

| accepted

Answered
Loop for 1:100
A_cont is a matrix of size 101 x 201. In row i of A_cont, the array AH(1:101) is stored in columns i to i+100 (thus in the part...

3 years ago | 1

| accepted

Answered
Using trapz to obtain the AUC over a fixed bin
If the x-values are 1,2,3,... dff = rand(115305,1); for i = 1:floor(numel(dff)/600) AUC(i) = trapz(dff((i-1)*600+1:i*600)...

3 years ago | 0

| accepted

Answered
Empty Sym: 0-by-1
f = @(y) cosh(y).*sinh(y)-5/3*y ; y = 0:0.01:1 ; plot(y,f(y)) syms x y assume (x,'real') eqn = cosh(y).*sinh(y)-5/3*y==0; ...

3 years ago | 0

| accepted

Answered
How do you make the diagonal and certain off-diagonal elements of a matrix zero?
n = 9; A = rand(n) for i=1:n-1 A(i,i+1) = 0.0; A(i+1,i) = 0.0; end A

3 years ago | 0

Answered
Retrieving numbers present within an array by knowing the coordinates
image_DEF_numero_pixel = importdata('image_DEF_numero_pixel.mat') union = importdata('union.mat') vector = arrayfun(@(x,y)imag...

3 years ago | 0

Answered
Having trouble solving two second order ODEs simultaneously
According to your equations in the graphics, these terms in the MATLAB code are wrong: - (1/Dij)*(2*diff(Rj,t)*diff(Rj,t,2)^2+ ...

3 years ago | 0

| accepted

Answered
Problem with calculating the negative are enclosed between a curve and the x-axis
Try idx = y<=0; jdx = y>=0; xn = x(idx); yn = y(idx); xp = x(jdx); yp = y(jdx); [xn,I] = sort(xn); yn = yn(I) [xp,J] = ...

3 years ago | 0

| accepted

Answered
Optimization of a simple composite structure
Why not varying the angle between -90 and 90 in steps of delta_theta and choosing the value of minimum deflection ? Do the fin...

3 years ago | 1

Answered
Why do I keep getting a zero for x(9) for Backward subsitution?
Don't generate random numbers that can become 0 on the diagonal. Or use your code to check if all U(i,i) are not equal 0. Furth...

3 years ago | 1

| accepted

Answered
Solving for the parameters of a distribution
The formula for the quantiles of the lognormal distribution as a function of p, mu and sigma is given here: https://en.wikipedi...

3 years ago | 0

Answered
How to solve an equation with arrays
syms b k_eff % reflector Dr=0.088; Sa_r=0.0033; %core Dc=1.45; Sa_c=0.0044; nu=2.5; Sf=0.0032; a=30; eqn = Dc*sqrt(-(2...

3 years ago | 0

| accepted

Answered
How to plot empirical cdf and fitted distributions cdfs?
Table = readtable("practice3.xlsx"); a = Table.values; a = sort(a); hold on cdfplot(a); % Make a plot of the empirical CDF ...

3 years ago | 0

| accepted

Answered
Not sure why I am getting errors for my anonymous functions.
This would work: k = randn(1); % random variable % define all of your variables below f = @(x) (sin(x)+4*x)./x.^2; A = f(5);...

3 years ago | 0

Answered
lsqcurvefit question - ydata has two dimension (Function value and YDATA sizes are not equal)
Your function "fun" must return a matrix of size (60x2) like the ydata you provide. This is not the case - thus the error messag...

3 years ago | 1

Answered
Is there a function to determine the non-exceedance probability of each value in the table?
You will first have to tell us the type of distribution the values are supposed to follow (e.g. log-normal distribution). After...

3 years ago | 0

Answered
How to have a function return a coordinate point?
[x,y] = unitCircle(pi/4) function [x y] = unitCircle(theta) z = [cos(theta),sin(theta)]; x = z(1); y = z(2); end

3 years ago | 0

| accepted

Answered
Is there something wrong with my anonymous function definition?
Fmincon expects fun1 to have one vector of length n of parameter values as input, not n scalar values as for your function fun1....

3 years ago | 0

| accepted

Answered
Numerical method of solving three unkown parameters
As far as I understand the article, the left-hand side of equation(18) is 0 at I = I_mpp, V = V_mpp according to equation (6). B...

3 years ago | 1

Answered
How can I overcome from this problem? any another method to solve this.
As long as you don't know the reason for the integration problem, you won't be able to overcome it. We can only refer to the di...

3 years ago | 0

| accepted

Answered
Integral from 0 to inf with imaginary numbers takes too long
It seems your integral does not exist. Note that by default, y is integrated with respect to x. I don't know if this is wanted ...

3 years ago | 0

Answered
trouble in make if statement simulation
Depends on what you want to achieve by the if-statement. You can either use if x(6)>0 && x(7)>0 H = 1; end to set H=1 i...

3 years ago | 0

| accepted

Answered
Wihle loop not running
At first (by your setting) v1 = 0. Thus the while loop is entered. After entering the while loop, v1 becomes x1 + y1 = [2 3 4 5...

3 years ago | 0

Answered
Calculate the difference between minimum values of a parabola and straight line (from a plot)
syms h V W S rho cd0 k cl Psl eqn = V == sqrt(2*W/rho/S/cl); cl = solve(eqn,cl); cd = cd0 + k * cl^2; D = 0.5 * rho * V * V ...

3 years ago | 1

Answered
I could'not understand why my plot doesnot show line?
plot(eta,f(2,:),'r') instead of plot(eta,f(2),'r')

3 years ago | 0

| accepted

Answered
Using a function and fsolve with a for loop
Look whether this might help. syms T x = sym('x',[1 4]); eqn1 = 10.*(T-x(1))+0.2.*(T.^4-x(1).^4) - x(4) == 0; eqn2 = -1.*(1/...

3 years ago | 0

Answered
Minimize a function with special constraints
Use "linprog". There are a lot of examples on how to use the solver under https://de.mathworks.com/help/optim/ug/linprog.html ...

3 years ago | 0

Load more