回答済み

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...

約1年 前 | 0

| 採用済み

送信済み

Building a Forest of Trees in MATLAB

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

約1年 前 | ダウンロード 6 件 |

回答済み

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. ...

約1年 前 | 0

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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...

約1年 前 | 0

回答済み

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...

約1年 前 | 0

回答済み

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....

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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...

約1年 前 | 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 ...

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 ...

約1年 前 | 0

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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 ...

約1年 前 | 0

回答済み

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...

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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; ...

約1年 前 | 1

回答済み

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 ...

約1年 前 | 2

回答済み

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...

約1年 前 | 0

回答済み

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 =...

約1年 前 | 0

回答済み

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...

約1年 前 | 1

| 採用済み

回答済み

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...

約1年 前 | 1

回答済み

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...

約1年 前 | 0

回答済み

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...

約1年 前 | 0

回答済み

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)...

約1年 前 | 0

回答済み

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...

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 0

回答済み

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...

約1年 前 | 0

| 採用済み

回答済み

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...

約1年 前 | 0

| 採用済み