Beantwortet

How to replace the values of a vector from desired location to its end?

The err in your code is with 0 in b's index that is not acceptable. Because b(0) does not exist. Which element of b vector are y...

How to replace the values of a vector from desired location to its end?

The err in your code is with 0 in b's index that is not acceptable. Because b(0) does not exist. Which element of b vector are y...

13 Tage vor | 0

Beantwortet

how to optimize a sweep for solving inequalities?

One of the possible ways to speed up your code is to get rid of display of resuts. Instead storing them, e.g.: syms ki kd i0 ...

how to optimize a sweep for solving inequalities?

One of the possible ways to speed up your code is to get rid of display of resuts. Instead storing them, e.g.: syms ki kd i0 ...

13 Tage vor | 0

Beantwortet

Solve a nonlinear function with one variable

It is quite simple to solve this exercise. Just use vpasolve(), e.g.: syms x Solution = vpasolve(x-x^2+2*sin(x)*(x-1)==0) An ...

Solve a nonlinear function with one variable

It is quite simple to solve this exercise. Just use vpasolve(), e.g.: syms x Solution = vpasolve(x-x^2+2*sin(x)*(x-1)==0) An ...

13 Tage vor | 1

Beantwortet

How do I remove the Ans from the result

You'd need to use either display or fprintf not to have ans, e.g.: %% fprintf if Alpha(1,1) == 1 fprintf('Ok \n') else Al...

How do I remove the Ans from the result

You'd need to use either display or fprintf not to have ans, e.g.: %% fprintf if Alpha(1,1) == 1 fprintf('Ok \n') else Al...

13 Tage vor | 0

Beantwortet

Error using logical operators on a string input

Here is the corrected part of your code. Note that you'd need to get a single value logical in order to compare the two differe...

Error using logical operators on a string input

Here is the corrected part of your code. Note that you'd need to get a single value logical in order to compare the two differe...

13 Tage vor | 0

Beantwortet

When I use vpasolve I get all variables as [0x1 sym], any input as to what the problem might be would be appreciated!

The problem here is that you have defined 4 equations and trying to solve for 5 unknowns (beta1, beta2 beta3 M2, M3) that is inc...

When I use vpasolve I get all variables as [0x1 sym], any input as to what the problem might be would be appreciated!

The problem here is that you have defined 4 equations and trying to solve for 5 unknowns (beta1, beta2 beta3 M2, M3) that is inc...

13 Tage vor | 0

| akzeptiert

Beantwortet

Solve a multiobjective optimization problem by problem-based approach in Matlab2021a

It is working ok: % teste_multiobjective file x1 = optimvar('x1','LowerBound',0); x2 = optimvar('x2','LowerBound',0); s1 = 5...

Solve a multiobjective optimization problem by problem-based approach in Matlab2021a

It is working ok: % teste_multiobjective file x1 = optimvar('x1','LowerBound',0); x2 = optimvar('x2','LowerBound',0); s1 = 5...

13 Tage vor | 0

Beantwortet

Why the color of bar plot of elementary effects is so light?

x = 1:11; y = [75 91 105 123.5 131 150 179 203 226 249 281.5]; bar(x, y, 'r')

Why the color of bar plot of elementary effects is so light?

x = 1:11; y = [75 91 105 123.5 131 150 179 203 226 249 281.5]; bar(x, y, 'r')

14 Tage vor | 0

Beantwortet

How to split dataset into 2/3 for training and 1/3 for testing include plot the graph?

You should use random partition of your total data set, e.g.: rng("default"); % For reproducibility n = length(X); % C = ...

How to split dataset into 2/3 for training and 1/3 for testing include plot the graph?

You should use random partition of your total data set, e.g.: rng("default"); % For reproducibility n = length(X); % C = ...

14 Tage vor | 0

Beantwortet

modelling permanent magnet motor

Yes, definitely it is feasible. You can do some regression analysis and then compare with the existing/builtin MATLAB/Simulink m...

modelling permanent magnet motor

Yes, definitely it is feasible. You can do some regression analysis and then compare with the existing/builtin MATLAB/Simulink m...

14 Tage vor | 0

Beantwortet

Why simulink double click or block properties respond slow

There might be a few different reasons for that. (1) Something is running on the back.If your model is computationally heavy an...

Why simulink double click or block properties respond slow

There might be a few different reasons for that. (1) Something is running on the back.If your model is computationally heavy an...

14 Tage vor | 0

Beantwortet

How to get pack ego actor matlab function

If you have this model shown in this screen shot, then just double click on the MATLAB fcn block and then use the syntax of that...

How to get pack ego actor matlab function

If you have this model shown in this screen shot, then just double click on the MATLAB fcn block and then use the syntax of that...

14 Tage vor | 0

Beantwortet

Data in groups to new table

(1) Import the data into MATLAB: D = readmatrix('Data.xlsx'); (2) Convert to date time: DTime = datetime(D(:,1), D(:,2), D(:,...

Data in groups to new table

(1) Import the data into MATLAB: D = readmatrix('Data.xlsx'); (2) Convert to date time: DTime = datetime(D(:,1), D(:,2), D(:,...

14 Tage vor | 0

Beantwortet

Not enough input arguments.

In your A_new, you should have vecnorm known in A_new. If vecnorm() is a norm of a vector x that you are trying to compute, then...

Not enough input arguments.

In your A_new, you should have vecnorm known in A_new. If vecnorm() is a norm of a vector x that you are trying to compute, then...

14 Tage vor | 0

Beantwortet

goodness of fit data for a fit

From your posted link, you can see that: (1) x is: x = lisqcurvefit(...) gives you the found fit model coefficients. E.g.: fr...

goodness of fit data for a fit

From your posted link, you can see that: (1) x is: x = lisqcurvefit(...) gives you the found fit model coefficients. E.g.: fr...

14 Tage vor | 0

Beantwortet

from an array, creating a row vector of elements but one row is in reverse order

Eg.: A = [ 1, 2 3; 4 5 6; 7 8 9] % Extract Row 1 a1 = A(1,:); % Extract Row 3 a3 = A(3.:); % Reverse Row 1 a1 = fliplr(a1...

from an array, creating a row vector of elements but one row is in reverse order

Eg.: A = [ 1, 2 3; 4 5 6; 7 8 9] % Extract Row 1 a1 = A(1,:); % Extract Row 3 a3 = A(3.:); % Reverse Row 1 a1 = fliplr(a1...

15 Tage vor | 0

Beantwortet

from an array, creating a row vector of elements but one row is in reverse order

Use : and fliplr(). See DOC1 and DOC2.

from an array, creating a row vector of elements but one row is in reverse order

Use : and fliplr(). See DOC1 and DOC2.

15 Tage vor | 0

Beantwortet

How Could I change cases name and direction in confusion matrix?

You can try xtickangle(), ytickangle()

How Could I change cases name and direction in confusion matrix?

You can try xtickangle(), ytickangle()

15 Tage vor | 0

Beantwortet

Where to find the marginal R-squared from a Linear-Mixed Effects model?

It does not have the marginal R-squared, and thus, you'd need to compute using the values from the prdicted values - see this DO...

Where to find the marginal R-squared from a Linear-Mixed Effects model?

It does not have the marginal R-squared, and thus, you'd need to compute using the values from the prdicted values - see this DO...

15 Tage vor | 0

| akzeptiert

Beantwortet

Unable to set the scale fro -inf to inf

Note that [inf -inf] will make your plot hardly visible and thus, you had better take a bit larger values to the two extreme po...

Unable to set the scale fro -inf to inf

Note that [inf -inf] will make your plot hardly visible and thus, you had better take a bit larger values to the two extreme po...

15 Tage vor | 0

Beantwortet

How to detect the inner part of the core?

Have you seen the code proposed by Image Analyst: https://www.mathworks.com/matlabcentral/answers/245026-shape-detection-in-imag...

How to detect the inner part of the core?

Have you seen the code proposed by Image Analyst: https://www.mathworks.com/matlabcentral/answers/245026-shape-detection-in-imag...

15 Tage vor | 0

Beantwortet

How to use function "totalreturnprice"?

To understand and see how this function works, it is better to look inside of this function. That can be achieved with the follo...

How to use function "totalreturnprice"?

To understand and see how this function works, it is better to look inside of this function. That can be achieved with the follo...

15 Tage vor | 0

Beantwortet

How to customize Colorbar on map?

If you want to change a tickmarks only, then : [X,Y] = meshgrid(-7:.25:7.5); Z1 = X.^2 + Y.^2; Z2 = Z1 + 10; figure surf(X,...

How to customize Colorbar on map?

If you want to change a tickmarks only, then : [X,Y] = meshgrid(-7:.25:7.5); Z1 = X.^2 + Y.^2; Z2 = Z1 + 10; figure surf(X,...

16 Tage vor | 0

Beantwortet

Index exceeds the number of array elements. Index must not exceed 512.

It is easier to check the syntaxes if these function files are put into one M-file and executed as whole one file (in my opinion...

Index exceeds the number of array elements. Index must not exceed 512.

It is easier to check the syntaxes if these function files are put into one M-file and executed as whole one file (in my opinion...

17 Tage vor | 0

Beantwortet

Loading a file into a variable in funtion

How you can call a function to load a data file, e.g.: FName = 'MY_data'; % .txt data files that all contain the sequential nam...

Loading a file into a variable in funtion

How you can call a function to load a data file, e.g.: FName = 'MY_data'; % .txt data files that all contain the sequential nam...

17 Tage vor | 0

Beantwortet

Please help, I don't understand the error. How I can make it correct?

There are a few crucial points overlooked in your code. (1) Placement of input entries (2) Placement of functions (SIRSol, SIR...

Please help, I don't understand the error. How I can make it correct?

There are a few crucial points overlooked in your code. (1) Placement of input entries (2) Placement of functions (SIRSol, SIR...

17 Tage vor | 1

Beantwortet

How to get the RGB values of each point on a surface when illuminated by 'light' objects?

If understood your question correctly, this might be the solution: ... s.SpecularStrength = 1; s.SpecularColorReflectance = 1...

How to get the RGB values of each point on a surface when illuminated by 'light' objects?

If understood your question correctly, this might be the solution: ... s.SpecularStrength = 1; s.SpecularColorReflectance = 1...

20 Tage vor | 0

Beantwortet

Problems with figures generated by the compiled App

This type of issues happen, when "hold all" or "hold on" is being used in the code. The solution is to use "hold off": ... pl...

Problems with figures generated by the compiled App

This type of issues happen, when "hold all" or "hold on" is being used in the code. The solution is to use "hold off": ... pl...

20 Tage vor | 0

| akzeptiert

Beantwortet

Nxt lego mindstorms connected to matlab

Have you seen this tutorial - see

Nxt lego mindstorms connected to matlab

Have you seen this tutorial - see

20 Tage vor | 0

| akzeptiert

Beantwortet

How can i return the output in an array to be used in a following function?

Here is the corrected code: myFreqArray = [25 32 40 50 63 79 100 126 158 200 251 316 398 501 631 794 1000 ... 1259 1585 ...

How can i return the output in an array to be used in a following function?

Here is the corrected code: myFreqArray = [25 32 40 50 63 79 100 126 158 200 251 316 398 501 631 794 1000 ... 1259 1585 ...

20 Tage vor | 0

| akzeptiert