Answered

How to extract before and after a character up to a certain limit?

regexp(str, {'(?<=z)[^c]+', '(?<=c)[^z]+'}, 'match','once')

How to extract before and after a character up to a certain limit?

regexp(str, {'(?<=z)[^c]+', '(?<=c)[^z]+'}, 'match','once')

5 hours ago | 1

Answered

How can I add curves to the Bode plot?

Use bodeplot() instead of bode() . bode() calls bodeplot() but does not return the handles that you need to get to the axes obje...

How can I add curves to the Bode plot?

Use bodeplot() instead of bode() . bode() calls bodeplot() but does not return the handles that you need to get to the axes obje...

6 hours ago | 0

Answered

matlab 2020 installation for me

You are using the Symbolic Toolbox in R2014a. Somewhere around release R2015b, the solve() function was upgraded and is now bett...

matlab 2020 installation for me

You are using the Symbolic Toolbox in R2014a. Somewhere around release R2015b, the solve() function was upgraded and is now bett...

6 hours ago | 0

Answered

How to fix this error Index exceeds the number of array elements (1) for a linear advection problem ?

for i=1:xmax if (0<=x(i))&&(x(i)<=50) u0(i)=0; elseif (50<=x(i))&&(x(i)<=110) u0(i)=100*sin(pi*(x-50...

How to fix this error Index exceeds the number of array elements (1) for a linear advection problem ?

for i=1:xmax if (0<=x(i))&&(x(i)<=50) u0(i)=0; elseif (50<=x(i))&&(x(i)<=110) u0(i)=100*sin(pi*(x-50...

6 hours ago | 0

Answered

Why setAttribute fails when passing one string as the value in 2016b?

string objects were introduced in r2016b, and it took a couple of releases for them to be accepted by all functions. Simulink in...

Why setAttribute fails when passing one string as the value in 2016b?

string objects were introduced in r2016b, and it took a couple of releases for them to be accepted by all functions. Simulink in...

17 hours ago | 1

Answered

Output argument "T" (and maybe others) not assigned during call to "StdAtm".

Same basic reason as https://www.mathworks.com/matlabcentral/answers/601621-getting-error-unrecognized-function-or-variable#answ...

Output argument "T" (and maybe others) not assigned during call to "StdAtm".

Same basic reason as https://www.mathworks.com/matlabcentral/answers/601621-getting-error-unrecognized-function-or-variable#answ...

20 hours ago | 0

Answered

solution of 3d nonlinear equation

x_p = 4; y_p = 5; z_p = 2; x_1 = 8; y_1 = 9; z_1 = 5; x_2 = 2; y_2 = 5; z_2 = 1; x_3 = 6; y_3 = 1; z_3 = 3; t1 = 5.692820*...

solution of 3d nonlinear equation

x_p = 4; y_p = 5; z_p = 2; x_1 = 8; y_1 = 9; z_1 = 5; x_2 = 2; y_2 = 5; z_2 = 1; x_3 = 6; y_3 = 1; z_3 = 3; t1 = 5.692820*...

21 hours ago | 0

Answered

Converting CSV files to xlsm excel worksheet

Because you have a mix of datatypes in the file, I recommend that you fopen() each file, and that you textscan() the next two li...

Converting CSV files to xlsm excel worksheet

Because you have a mix of datatypes in the file, I recommend that you fopen() each file, and that you textscan() the next two li...

21 hours ago | 0

Answered

Does anyone know of a function that will take timeseries data and find 12-hour averages throughout (day and night averages)?

Convert the timeseries to a timetable object, TT, and use rt = TT.Properties.RowTimes; first_day = dateshift(rt(1), 'start, '...

Does anyone know of a function that will take timeseries data and find 12-hour averages throughout (day and night averages)?

Convert the timeseries to a timetable object, TT, and use rt = TT.Properties.RowTimes; first_day = dateshift(rt(1), 'start, '...

21 hours ago | 0

Answered

Unable to open openExample('nav/GenerateAlternativeTrajectoriesForReferencePathExample')

referencePathFrenet was introduce in R2020b, whereas you have R2020a.

Unable to open openExample('nav/GenerateAlternativeTrajectoriesForReferencePathExample')

referencePathFrenet was introduce in R2020b, whereas you have R2020a.

22 hours ago | 0

| accepted

Answered

How to solve the Gompertz Equation

r= (0.349) t = (1790:10:1860)'; E= k.*(p/k).^exp(-r*t); Okay, so -r*t is between -0.349*1790 and -0.349*1860 which is roughly...

How to solve the Gompertz Equation

r= (0.349) t = (1790:10:1860)'; E= k.*(p/k).^exp(-r*t); Okay, so -r*t is between -0.349*1790 and -0.349*1860 which is roughly...

22 hours ago | 0

Answered

simple problem with double integral, why give me an error?

I did not do a detailed analysis, but at the moment it looks to me as if iterm can only be complex valued if log(t-ti(i)) is c...

simple problem with double integral, why give me an error?

I did not do a detailed analysis, but at the moment it looks to me as if iterm can only be complex valued if log(t-ti(i)) is c...

22 hours ago | 0

Answered

How can i implement subtraction without using for-loop ?

JminusK = J - permute(K, [3 2 1]); The size of JminusK will be 1000 x 7 x 16.

How can i implement subtraction without using for-loop ?

JminusK = J - permute(K, [3 2 1]); The size of JminusK will be 1000 x 7 x 16.

22 hours ago | 0

Answered

How can I improve this really slow code, which consists of several nested for loops?

If you can, arrange DifferenceMap to accept a vector of T values. In the ode45() call, instead of passing in the two-element vec...

How can I improve this really slow code, which consists of several nested for loops?

If you can, arrange DifferenceMap to accept a vector of T values. In the ode45() call, instead of passing in the two-element vec...

23 hours ago | 0

| accepted

Answered

How to plot non-square 3 dimensional matrix?

Example: %create some data for demonstration lat = sort(rand(49,1))*180-90; long = sort(rand(65,1))*360-180; alt = sort(rand...

How to plot non-square 3 dimensional matrix?

Example: %create some data for demonstration lat = sort(rand(49,1))*180-90; long = sort(rand(65,1))*360-180; alt = sort(rand...

23 hours ago | 0

| accepted

Answered

can't find the solution of the equation

D is a vector, so your eqn is a vector. When you pass more than one equation to solve(), then you are asking solve() to find th...

can't find the solution of the equation

D is a vector, so your eqn is a vector. When you pass more than one equation to solve(), then you are asking solve() to find th...

23 hours ago | 0

| accepted

Answered

Using fzero to find variation

If you know the optimal D and optimal tension, and you have a function that calculates tension given D, then if you find the zer...

Using fzero to find variation

If you know the optimal D and optimal tension, and you have a function that calculates tension given D, then if you find the zer...

23 hours ago | 0

Answered

Pareto Front of the multi-objective problem

for both gamultiobj() and paretosearch() you can add an OutputFcn to the options structure. If you look at https://www.mathwork...

Pareto Front of the multi-objective problem

for both gamultiobj() and paretosearch() you can add an OutputFcn to the options structure. If you look at https://www.mathwork...

24 hours ago | 0

Answered

Getting Error: Unrecognized Function or Variable

If your balloon starts descending before it reaches 32000 units, then it will reach the ground, h < 0, which is a condition not ...

Getting Error: Unrecognized Function or Variable

If your balloon starts descending before it reaches 32000 units, then it will reach the ground, h < 0, which is a condition not ...

24 hours ago | 0

Answered

Download Matlab 2019a

If you have authorization to download MATLAB then https://www.mathworks.com/downloads/web_downloads/download_release?release=R2...

Download Matlab 2019a

If you have authorization to download MATLAB then https://www.mathworks.com/downloads/web_downloads/download_release?release=R2...

1 day ago | 0

Answered

Node degree from lat/lon

Is there a way of finding the most commonly occuring pairs from an array? You do not have a graph, so you cannot use graph() ob...

Node degree from lat/lon

Is there a way of finding the most commonly occuring pairs from an array? You do not have a graph, so you cannot use graph() ob...

1 day ago | 0

Answered

MATLAB code never stops running (infinite loop)

Around line 62 or so you have for n=1:now Within that for loop, around line 140 or so you have if m ==1 ...

MATLAB code never stops running (infinite loop)

Around line 62 or so you have for n=1:now Within that for loop, around line 140 or so you have if m ==1 ...

1 day ago | 0

Answered

File extension not recognized

You need to apply detectImportOptions onto a particular filename, not to a wildcard file extension. You cannot extend detectImpo...

File extension not recognized

You need to apply detectImportOptions onto a particular filename, not to a wildcard file extension. You cannot extend detectImpo...

1 day ago | 0

Answered

To restore the original image dimension after applying masks.

Your code to apply the mask to img does not change the size of img. If you need to get out something that is the size of I afte...

To restore the original image dimension after applying masks.

Your code to apply the mask to img does not change the size of img. If you need to get out something that is the size of I afte...

1 day ago | 0

| accepted

Answered

Disable font smoothing in colorbar object

cb = colorbar(appropriate_axes); cb.Ruler.FontSmoothing = 'off';

Disable font smoothing in colorbar object

cb = colorbar(appropriate_axes); cb.Ruler.FontSmoothing = 'off';

1 day ago | 1

| accepted

Answered

colorbar no longer supported in GUIDE 2020a - quick fix?

this dialogue only appears when I open the .fig file in GUIDE (i.e. right clicking on the file in Matlab environment and selecti...

colorbar no longer supported in GUIDE 2020a - quick fix?

this dialogue only appears when I open the .fig file in GUIDE (i.e. right clicking on the file in Matlab environment and selecti...

1 day ago | 0

Answered

Problem with Matlab Standalone Application

Symbolic Toolbox can never be compiled.

Problem with Matlab Standalone Application

Symbolic Toolbox can never be compiled.

1 day ago | 1

| accepted

Answered

How do I plot contours colours within ranges?

contourf() and pass in a specific list of contour level values. Combine that with a custom colormap and probably the caxis() com...

How do I plot contours colours within ranges?

contourf() and pass in a specific list of contour level values. Combine that with a custom colormap and probably the caxis() com...

1 day ago | 0

| accepted

Answered

Take Xor between Hexadecimal and binary

Provided that you do not have more than 64 bits, the easiest approach is to convert them both to decimal, use bitxor() with appr...

Take Xor between Hexadecimal and binary

Provided that you do not have more than 64 bits, the easiest approach is to convert them both to decimal, use bitxor() with appr...

1 day ago | 0

Answered

to load Matlab executable once and keep calling the function many times?

If you know the number ahead of time, perhaps pass it as a command line argument? At least if your executable is MATLAB and not ...

to load Matlab executable once and keep calling the function many times?

If you know the number ahead of time, perhaps pass it as a command line argument? At least if your executable is MATLAB and not ...

1 day ago | 0