Answered

circle marker weird filling

Linewidth problems. The circle is drawn as a series of straight segments and when the Linewidth is not 1 the ends of the lines e...

circle marker weird filling

Linewidth problems. The circle is drawn as a series of straight segments and when the Linewidth is not 1 the ends of the lines e...

5 days ago | 0

| accepted

Answered

Why MATLAB cannot render $\Beta$ (LaTeX string) in xlabel, ylabel?

MATLAB's latex does not specifically support Greek. Instead, it supports some mathematical symbols, some of which happen to rese...

Why MATLAB cannot render $\Beta$ (LaTeX string) in xlabel, ylabel?

MATLAB's latex does not specifically support Greek. Instead, it supports some mathematical symbols, some of which happen to rese...

5 days ago | 1

Answered

how to repeat an input question

all_A = {}; while true A = input('give me a sentence!: ','s'); %asks user for sentence input if strcmpi(strtrim(A), 'en...

how to repeat an input question

all_A = {}; while true A = input('give me a sentence!: ','s'); %asks user for sentence input if strcmpi(strtrim(A), 'en...

5 days ago | 0

Answered

How to make negative degree numbers positive while maintaining degree.

You can use logical indexing.... avg_deg = randi([-719 719], 1, 10) mask = avg_deg < 0; new_deg_version_1 = avg_deg; new_d...

How to make negative degree numbers positive while maintaining degree.

You can use logical indexing.... avg_deg = randi([-719 719], 1, 10) mask = avg_deg < 0; new_deg_version_1 = avg_deg; new_d...

5 days ago | 0

| accepted

Answered

How to plot a 3D surface with two vectors and one array?

Create full vectors of coordinates and arrayfun() x = linspace(-10, 10, 100); y = linspace(-0.5, 0.5, 100); [X, Y] = meshgrid...

How to plot a 3D surface with two vectors and one array?

Create full vectors of coordinates and arrayfun() x = linspace(-10, 10, 100); y = linspace(-0.5, 0.5, 100); [X, Y] = meshgrid...

5 days ago | 1

| accepted

Answered

dot product and indexing

The 1:k-1 can only work properly if k is a scalar. NRow(1:k-1) == NCol(k) That part tests whether each value in NRow before in...

dot product and indexing

The 1:k-1 can only work properly if k is a scalar. NRow(1:k-1) == NCol(k) That part tests whether each value in NRow before in...

5 days ago | 0

Answered

When I export the figure, the x-axis is halved even though I have set the interval in the code.

I do not observe that? I observe a possible loss of quality, but keep in mind that the image taken includes the outside of the ...

When I export the figure, the x-axis is halved even though I have set the interval in the code.

I do not observe that? I observe a possible loss of quality, but keep in mind that the image taken includes the outside of the ...

6 days ago | 0

Answered

Solving an ordinary differential equation.

Q = @(v) sym(v); h = Q(10); k = Q(60); t = Q(0.01); T0 = Q(10); T1 = Q(10); q = Q(800); syms T(x) dT = diff(T); d2T...

Solving an ordinary differential equation.

Q = @(v) sym(v); h = Q(10); k = Q(60); t = Q(0.01); T0 = Q(10); T1 = Q(10); q = Q(800); syms T(x) dT = diff(T); d2T...

6 days ago | 0

| accepted

Answered

clear is solwer than writing

You might be interested in the timing tests I did at https://www.mathworks.com/matlabcentral/answers/60240-what-is-the-differenc...

clear is solwer than writing

You might be interested in the timing tests I did at https://www.mathworks.com/matlabcentral/answers/60240-what-is-the-differenc...

6 days ago | 1

Answered

Solve a integral equation

Q = @(v) sym(v); syms t C real alpha = Q(2); sigma = Q(0.4); Pi = Q(pi); f(t) = exp(-(log(t)^2/(2*sigma^2)))/(t * sigma...

Solve a integral equation

Q = @(v) sym(v); syms t C real alpha = Q(2); sigma = Q(0.4); Pi = Q(pi); f(t) = exp(-(log(t)^2/(2*sigma^2)))/(t * sigma...

6 days ago | 0

Answered

License Server Unsupported -5 errors

Over at https://forums.developer.nvidia.com/t/no-such-feature-exists-after-updating-our-licens/135772 I find an indication that ...

License Server Unsupported -5 errors

Over at https://forums.developer.nvidia.com/t/no-such-feature-exists-after-updating-our-licens/135772 I find an indication that ...

6 days ago | 0

| accepted

Answered

solve a complex second order differential equation

You cannot use any numeric solver for that. You have initial conditions at η = 0, but at 0 you have a division by 0 which gets y...

solve a complex second order differential equation

You cannot use any numeric solver for that. You have initial conditions at η = 0, but at 0 you have a division by 0 which gets y...

7 days ago | 0

Answered

Is it possible if we convert the audio that has 1 channel (mono) to 2 channel (stereo) in Matlab?

Stereo = repmat(Mono(:), 1, 2); In the case where Mono is already known to be a column vector then this can be simplified to S...

Is it possible if we convert the audio that has 1 channel (mono) to 2 channel (stereo) in Matlab?

Stereo = repmat(Mono(:), 1, 2); In the case where Mono is already known to be a column vector then this can be simplified to S...

7 days ago | 0

Answered

break function into individual variable

syms C1 C2 x y = C1*cos(2*x) - C2*sin(2*x) Y1 = children(y, 1) Y2 = children(y, 2)

break function into individual variable

syms C1 C2 x y = C1*cos(2*x) - C2*sin(2*x) Y1 = children(y, 1) Y2 = children(y, 2)

7 days ago | 0

Answered

How to display the time by a method other than the digital timer method from "duration" or "datetime"

hms() can be called passing in a duration object or a datetime object. S = seconds(finTime) ; [h, m, s] = hms(S) ;

How to display the time by a method other than the digital timer method from "duration" or "datetime"

hms() can be called passing in a duration object or a datetime object. S = seconds(finTime) ; [h, m, s] = hms(S) ;

7 days ago | 1

| accepted

Answered

draw a 3d graph with mat function

You were not sampling finely enough, and you were also plotting outside the desired range. [X, Y] = meshgrid(linspace(0,2*pi));...

draw a 3d graph with mat function

You were not sampling finely enough, and you were also plotting outside the desired range. [X, Y] = meshgrid(linspace(0,2*pi));...

7 days ago | 0

Answered

Empty sym: 0-by-1

Q = @(v) sym(v); Tc = Q(400); Pc = Q(35); R = Q(0.0821); Z = Q(0.34); syms Vc a b c; %assume([b, c], 'real') assumeAlso...

Empty sym: 0-by-1

Q = @(v) sym(v); Tc = Q(400); Pc = Q(35); R = Q(0.0821); Z = Q(0.34); syms Vc a b c; %assume([b, c], 'real') assumeAlso...

7 days ago | 1

| accepted

Answered

How to plot an Integral

Q = @(x) sym(x); m = Q(0.023); g = Q(9.81); rho = Q(1.2); s = Q(0.00011); Cd = Q(0.9); syms v V real f =(2 .* m .* g)...

How to plot an Integral

Q = @(x) sym(x); m = Q(0.023); g = Q(9.81); rho = Q(1.2); s = Q(0.00011); Cd = Q(0.9); syms v V real f =(2 .* m .* g)...

7 days ago | 0

| accepted

Answered

how is it possible to introduce the lead value of the inputs of GA in matlab

I want to solve a multi objective problem with Genetic algorithm tool box in matleb. Note that ga() can only be used for single...

how is it possible to introduce the lead value of the inputs of GA in matlab

I want to solve a multi objective problem with Genetic algorithm tool box in matleb. Note that ga() can only be used for single...

8 days ago | 0

| accepted

Answered

How can I run the calculation of one equation through a range of variables in one loop

S_T = 0:3:60; %row vector TGDs = sind(TS_T); %Sine of incline TGDc = cosd(TC_T); %Cosine of incline Ax = (0:0.25:5).'; %c...

How can I run the calculation of one equation through a range of variables in one loop

S_T = 0:3:60; %row vector TGDs = sind(TS_T); %Sine of incline TGDc = cosd(TC_T); %Cosine of incline Ax = (0:0.25:5).'; %c...

8 days ago | 0

Answered

Alternative way of defining a variable

https://www.mathworks.com/help/optim/ug/problem-based-workflow.html Problem based optimization permits you to use optimvar() to...

Alternative way of defining a variable

https://www.mathworks.com/help/optim/ug/problem-based-workflow.html Problem based optimization permits you to use optimvar() to...

8 days ago | 0

Answered

Please help me to look at the code. Thx

inf(3) [-1./inf (3)] If inf(3) returns a 3 x 3 array of inf, then why doesn't [-1./inf (3)] take -1 divided by a 3 x 3 array o...

Please help me to look at the code. Thx

inf(3) [-1./inf (3)] If inf(3) returns a 3 x 3 array of inf, then why doesn't [-1./inf (3)] take -1 divided by a 3 x 3 array o...

8 days ago | 0

Answered

What should go in a next-generation MATLAB X?

As part of a discussion https://www.mathworks.com/matlabcentral/answers/1450984-what-should-go-in-a-next-generation-matlab-x#com...

What should go in a next-generation MATLAB X?

As part of a discussion https://www.mathworks.com/matlabcentral/answers/1450984-what-should-go-in-a-next-generation-matlab-x#com...

8 days ago | 1

Answered

I am trying to calculate and plot subsonic coefficients of pressure symbolically, but it is returning a piecewise function that I can't easily plot, what am I doing wrong?

syms x ksi %N = 20; gamma = 1.4; limits = [0 1]; M = 1.2; %alpha = deg2rad([-5:1:20]); %X = linspace(0,1,N); %Geometr...

I am trying to calculate and plot subsonic coefficients of pressure symbolically, but it is returning a piecewise function that I can't easily plot, what am I doing wrong?

syms x ksi %N = 20; gamma = 1.4; limits = [0 1]; M = 1.2; %alpha = deg2rad([-5:1:20]); %X = linspace(0,1,N); %Geometr...

9 days ago | 0

Answered

error on start up

Quit MATLAB. Then rename C:\Users\Erasmus\Documents\MATLAB to C:\Users\Erasmus\Documents\old-MATLAB Now start MATLAB again; i...

error on start up

Quit MATLAB. Then rename C:\Users\Erasmus\Documents\MATLAB to C:\Users\Erasmus\Documents\old-MATLAB Now start MATLAB again; i...

9 days ago | 0

| accepted

Answered

problem with creat function

Your blockDecodeSyndromeMethod is trying to call DecodeSyndromeMethod with more inputs than DecodeSyndromeMethod wants. Howeve...

problem with creat function

Your blockDecodeSyndromeMethod is trying to call DecodeSyndromeMethod with more inputs than DecodeSyndromeMethod wants. Howeve...

9 days ago | 0

Answered

plotting a 2-colum 2d array

That syntax of using . and then a number inside (), only works for table() objects. UIAxes = gca; A = [1, 2; 5, 6; 10, 11; 1...

plotting a 2-colum 2d array

That syntax of using . and then a number inside (), only works for table() objects. UIAxes = gca; A = [1, 2; 5, 6; 10, 11; 1...

9 days ago | 1

| accepted

Answered

Taylor series using For loop to approximate Sin(x).

SIN(-3) function y = SIN(x) %UNTITLED Summary of this function goes here % Detailed explanation goes here n ...

Taylor series using For loop to approximate Sin(x).

SIN(-3) function y = SIN(x) %UNTITLED Summary of this function goes here % Detailed explanation goes here n ...

9 days ago | 0

| accepted

Answered

Check for equality in the contents of two arrays ignoring order

%sets case A = [1 3]; B = [3 1]; isequal(unique(A), unique(B)) For the sets case, a different approach just might be faster...

Check for equality in the contents of two arrays ignoring order

%sets case A = [1 3]; B = [3 1]; isequal(unique(A), unique(B)) For the sets case, a different approach just might be faster...

9 days ago | 0

| accepted