Answered

Here in my code I defined A vector and B vector for my linear programing, the relationship between them is Ax=<B which A is a inequlity vector and B is a RHS and x is variable. the Error is in photo which i attached .how can I solve it?

This problem is happening because |load_kw| is probably not a scalar, wheres your code seems to indicate it is a scaler. If It i...

Here in my code I defined A vector and B vector for my linear programing, the relationship between them is Ax=<B which A is a inequlity vector and B is a RHS and x is variable. the Error is in photo which i attached .how can I solve it?

This problem is happening because |load_kw| is probably not a scalar, wheres your code seems to indicate it is a scaler. If It i...

11 maanden ago | 0

| accepted

Submitted

Building a Forest of Trees in MATLAB

This live script demonstrates the use of handle classes by creating and visualizing tree structures in MATLAB.

ongeveer een jaar ago | 9 downloads |

Answered

Find the parameters of integration

Try this. This requires optimization toolbox. This uses the sum of squared error from your equations as an objective function. ...

Find the parameters of integration

Try this. This requires optimization toolbox. This uses the sum of squared error from your equations as an objective function. ...

ongeveer een jaar ago | 0

Answered

Passing a component as an argument in App Designer

I have attached an example app, in which I have three axes and I have written a simple function which plots random values on inp...

Passing a component as an argument in App Designer

I have attached an example app, in which I have three axes and I have written a simple function which plots random values on inp...

ongeveer een jaar ago | 1

| accepted

Answered

How to setup system of linear equations in matrix form?

You can do it by making a matrix |A| of coefficients and a matrix |b| of the number on right side of the equations. A = [c...

How to setup system of linear equations in matrix form?

You can do it by making a matrix |A| of coefficients and a matrix |b| of the number on right side of the equations. A = [c...

ongeveer een jaar ago | 0

Answered

help to read and write to .txt faster

For faster writes, refer to Jan's answer to this question: <https://www.mathworks.com/matlabcentral/answers/83870-fastest-way-to...

help to read and write to .txt faster

For faster writes, refer to Jan's answer to this question: <https://www.mathworks.com/matlabcentral/answers/83870-fastest-way-to...

ongeveer een jaar ago | 0

Answered

How to See Each Formulate Numbers on Regionprops

The following will give you a vector of all area values areaValues = [s.Area]; concatenation operator |[]| is important....

How to See Each Formulate Numbers on Regionprops

The following will give you a vector of all area values areaValues = [s.Area]; concatenation operator |[]| is important....

ongeveer een jaar ago | 0

| accepted

Answered

How to fix this issue in the graph??

That is because you are adding nodes to |Gvsub| and saving it in |H|, the |Gvsub| variable does not change and in next iteration...

How to fix this issue in the graph??

That is because you are adding nodes to |Gvsub| and saving it in |H|, the |Gvsub| variable does not change and in next iteration...

ongeveer een jaar ago | 1

| accepted

Answered

Ignoring markers and lines in legend

From legend documentation, it appears that MATLAB does not support direct control over |legend| markers. They are decided automa...

Ignoring markers and lines in legend

From legend documentation, it appears that MATLAB does not support direct control over |legend| markers. They are decided automa...

ongeveer een jaar ago | 1

Answered

How do I scale coordinates for different image sizes?

You can use |interp1()| to linearly map the coordinates from old image size to new image size. x_new = interp1([1 900], [1 ...

How do I scale coordinates for different image sizes?

You can use |interp1()| to linearly map the coordinates from old image size to new image size. x_new = interp1([1 900], [1 ...

ongeveer een jaar ago | 0

Answered

How to solve an equation with two vectors

|'%g'| is for numeric type, since your |v| vector is |sym|, therefore, you need to use |'%s'| syms t A=[-7,3,-1]; B=[1,0,5...

How to solve an equation with two vectors

|'%g'| is for numeric type, since your |v| vector is |sym|, therefore, you need to use |'%s'| syms t A=[-7,3,-1]; B=[1,0,5...

ongeveer een jaar ago | 1

| accepted

Answered

fzero: Not Enough Input Arguments

Since your number of equations (100) is greater than the number of variables (5), the best you can expect is a least square solu...

fzero: Not Enough Input Arguments

Since your number of equations (100) is greater than the number of variables (5), the best you can expect is a least square solu...

ongeveer een jaar ago | 1

| accepted

Answered

How to create a multiple linear regression model

Your use of |fitlm()| is correct. Alternatively, if you don't need all the extra information provided by |fitlm()| and speed is ...

How to create a multiple linear regression model

Your use of |fitlm()| is correct. Alternatively, if you don't need all the extra information provided by |fitlm()| and speed is ...

ongeveer een jaar ago | 0

Answered

how to resample points with preset angle

Try this x = points(:,1); % first column of points you shared y = points(:,2); % second column of points x_new = int...

how to resample points with preset angle

Try this x = points(:,1); % first column of points you shared y = points(:,2); % second column of points x_new = int...

ongeveer een jaar ago | 0

| accepted

Answered

gca.XLimMode does not work

If you check the |xLimMode| after running your code, you will see that it has changed back to |auto| after the |plot()| statemen...

gca.XLimMode does not work

If you check the |xLimMode| after running your code, you will see that it has changed back to |auto| after the |plot()| statemen...

ongeveer een jaar ago | 1

| accepted

Answered

How to pad extra 0 after 5 consecutive 1's in an array

Try this a= [1 1 1 1 1 1 1 1 1 1 1 1]; b = a; count = 1; while true index = strfind(b(count:end), [1 1 1 1 1])+5; ...

How to pad extra 0 after 5 consecutive 1's in an array

Try this a= [1 1 1 1 1 1 1 1 1 1 1 1]; b = a; count = 1; while true index = strfind(b(count:end), [1 1 1 1 1])+5; ...

ongeveer een jaar ago | 1

Answered

Increasing increment values with vector operations

difference = 11:2:29; a = 25+[0 cumsum(difference)] a = 25 36 49 64 81 100 121 144 169 196 ...

Increasing increment values with vector operations

difference = 11:2:29; a = 25+[0 cumsum(difference)] a = 25 36 49 64 81 100 121 144 169 196 ...

ongeveer een jaar ago | 2

Answered

Not able to add 2d array to 3d array

The error is probably caused because the dimension of |cycle| are not |[50000 x 4]|. Also, if |cycle| is has a constant value th...

Not able to add 2d array to 3d array

The error is probably caused because the dimension of |cycle| are not |[50000 x 4]|. Also, if |cycle| is has a constant value th...

ongeveer een jaar ago | 0

Answered

Multiple line plots of matrix with color depending on other vector

The order of plot colors is decided by the |ColorOrder| property of the |axes| object. You can access this property as ax =...

Multiple line plots of matrix with color depending on other vector

The order of plot colors is decided by the |ColorOrder| property of the |axes| object. You can access this property as ax =...

ongeveer een jaar ago | 0

Answered

How can I change the rows of a nchoosek matrix to zero, according to a specific pattern, and avoid nested while loops?

Here is my attempt to generate the pattern as described in your question, there might be more efficient ways. combs45 = nch...

How can I change the rows of a nchoosek matrix to zero, according to a specific pattern, and avoid nested while loops?

Here is my attempt to generate the pattern as described in your question, there might be more efficient ways. combs45 = nch...

ongeveer een jaar ago | 1

| accepted

Answered

fun(@x)

If you have a vector of |x| and |y| values then you can use several functions to estimate |B|. The correct method to use dependi...

fun(@x)

If you have a vector of |x| and |y| values then you can use several functions to estimate |B|. The correct method to use dependi...

ongeveer een jaar ago | 1

Answered

The variable appears to change size in every loop iteration, I have no idea how to fix. I get this for divDIF Line 13 and a line 21.

This is not an error, this is a warning which |mlint| produce to increase the speed and efficiency of your code. It is better to...

The variable appears to change size in every loop iteration, I have no idea how to fix. I get this for divDIF Line 13 and a line 21.

This is not an error, this is a warning which |mlint| produce to increase the speed and efficiency of your code. It is better to...

ongeveer een jaar ago | 0

Answered

Trajectory designing Matlab code

You can use <https://www.mathworks.com/help/simulink/slref/fromworkspace.html From Workspace> block to transfer trajectory signa...

Trajectory designing Matlab code

You can use <https://www.mathworks.com/help/simulink/slref/fromworkspace.html From Workspace> block to transfer trajectory signa...

ongeveer een jaar ago | 0

Answered

hi..Im new in matlab programming. Can someone help me plot 3D graph of y=x-x^2, where z is form negative infinity to infinity.

If you want to plot something the 3d surface plot of this equation z = y - x + x^2 then try x = linspace(-0.5, 0.5)...

hi..Im new in matlab programming. Can someone help me plot 3D graph of y=x-x^2, where z is form negative infinity to infinity.

If you want to plot something the 3d surface plot of this equation z = y - x + x^2 then try x = linspace(-0.5, 0.5)...

ongeveer een jaar ago | 0

Answered

is there a way to get the values associated with the *minor* tick marks?

ax = gca; get(ax.XAxis, 'MinorTickValues') For R2014b and later, following also work ax = gca; ax.XAxis.MinorTickV...

is there a way to get the values associated with the *minor* tick marks?

ax = gca; get(ax.XAxis, 'MinorTickValues') For R2014b and later, following also work ax = gca; ax.XAxis.MinorTickV...

ongeveer een jaar ago | 0

| accepted

Answered

how to get an analytical solution

The existence of an analytical solution is not always necessary. I cannot prove mathematically but it might be the case that thi...

how to get an analytical solution

The existence of an analytical solution is not always necessary. I cannot prove mathematically but it might be the case that thi...

ongeveer een jaar ago | 0

| accepted

Answered

Trying to isolate rows in a specific time

First of all, your |csv| file is not properly formatted. So it is difficult to use |csvread()| or |readtable()| directly. The fo...

Trying to isolate rows in a specific time

First of all, your |csv| file is not properly formatted. So it is difficult to use |csvread()| or |readtable()| directly. The fo...

ongeveer een jaar ago | 0

| accepted

Answered

X and Y axis labels overwritten and illiegible

I don't have your data, therefore, can't test the complete code but I guess the problem is happening because your code is effect...

X and Y axis labels overwritten and illiegible

I don't have your data, therefore, can't test the complete code but I guess the problem is happening because your code is effect...

ongeveer een jaar ago | 0

Answered

How do you get a global average at each time step so they can be summed?

If you want to average at each time step as by omitting the |sum()| function. For example averageTimeSteps = mean(mean(mean...

How do you get a global average at each time step so they can be summed?

If you want to average at each time step as by omitting the |sum()| function. For example averageTimeSteps = mean(mean(mean...

ongeveer een jaar ago | 0

| accepted

Answered

Number of precision digits( sum(sum(A)) not equal to sum(A:)

It might be happening because of finite precision of floating point numbers, Also, calling the |sum()| twice seems to be amplif...

Number of precision digits( sum(sum(A)) not equal to sum(A:)

It might be happening because of finite precision of floating point numbers, Also, calling the |sum()| twice seems to be amplif...

ongeveer een jaar ago | 0

| accepted