답변 있음
Calculation from user input with blank cells
The answer depends on how you would calculate the ratio |Mo| for fewer gears. If, say, the user omits Gear 3, do you want to sim...

7년 이상 전 | 0

답변 있음
how to find the minimum value based on two independent value
I'm going to assume you're really trying to minimize a function of two variables and show how you can explore it to get some ins...

7년 이상 전 | 0

답변 있음
Issue finding numerical error (problem with MATLAB's precision?)
That pesky MATLAB - getting more accurate all the time! Here is an example that I got from the blog article <http://matlabgeeks....

7년 이상 전 | 0

답변 있음
Add folders and subfolders to projrct through script
See <http://www.mathworks.com/help/matlab/ref/mkdir.html mkdir>.

7년 이상 전 | 0

답변 있음
Accessing Cell Array elements
I'm not sure I understand all the details of what you are trying to do, but I can show you with an example how to modify the sec...

7년 이상 전 | 0

| 수락됨

답변 있음
symbolic cubic polynomial solver
I ran the same code and got 3 solutions: syms x a xsols = solve(x^3+x^2-x+a,'real',true); size(xsols) ans = ...

7년 이상 전 | 0

답변 있음
what is the equivalent matlab function for the operator || || ?
You're probably referring to the <https://en.wikipedia.org/wiki/Matrix_norm matrix norm>, which is a generalization of the idea ...

7년 이상 전 | 0

| 수락됨

답변 있음
Subscripts in MATLAB Legends
I'm beginning to think you should submit a bug report. However, maybe you'll get more consistent results with h=legend('$e_...

7년 이상 전 | 1

| 수락됨

답변 있음
How is it possible that matlab solves two simultaneous equations which have relation to each other? I am very new with matlab and can not get it done. I want to solve several equations with the euler method bot always get errors.
You could just write Pg = 1; but a better way, since you know how large the vector will be, is to preallocate the memor...

7년 이상 전 | 0

| 수락됨

답변 있음
How Can I establish a raking scale of variables within an array?
Your ranking scheme is somewhat unusual because usually the ranking does not have any gaps in it. That would be easy to implemen...

7년 이상 전 | 0

| 수락됨

답변 있음
Matrices with Polynomial Entries functions
Maria, is the matrix inverse your goal, or are you using it for some other purpose? A common mistake is to solve a linear equati...

7년 이상 전 | 0

답변 있음
Use dynamic "offset" in a for-loop
It would be better to use a |while| loop to increment |t| directly: t = window; while t < numel(m) % increment t ...

8년 이하 전 | 0

| 수락됨

답변 있음
Stop permanently execution of codes under a Callback using another Callback
Reena, have a look at <http://www.mathworks.com/matlabcentral/answers/101649-how-can-i-interrupt-a-callback-and-not-come-back-to...

8년 이하 전 | 0

| 수락됨

답변 있음
Extract certain rows from matrix
Assuming you read the other data file into |another_matrix|, the answer is extracted_data = another_matrix(loc); I sugge...

8년 이하 전 | 0

| 수락됨

답변 있음
How can I plot using a string in MATLAB?
It's not necessary to have all those conditional statements. Just use indexing: function plotting_fcn(idx) % Note: idx cou...

8년 이하 전 | 1

답변 있음
Is it possible to solve a pair of two equations for four unknowns
Since the answer is not unique, just pick x=y=1 and solve the linear equation to get A and B: [12.12 2.35; 8.55 6.44]\[6.20...

8년 이하 전 | 0

답변 있음
Amplitude adjustment on integral
Just calculate the integral (see <http://www.mathworks.com/help/matlab/ref/integral.html integral>), say q = integral(fun,x...

8년 이하 전 | 0

| 수락됨

답변 있음
LaTeX interpreter on a legend
You could try setting the interpreter to LaTeX: legend(ar, 'Location','best','Interpreter','latex') For this to work...

8년 이하 전 | 1

답변 있음
Index out of bounds
The variable name |filename| is probably |char|, not numeric. Suppose you define filename = '12'; Then if you view the s...

8년 이하 전 | 1

| 수락됨

답변 있음
inflection point on sum of sinusoids
If you define a vector A = [A1 A2 ... An], and analogous vectors |w| and |p|, then in MATLAB y = sum(A.*sin(w*t+p)); and...

8년 이하 전 | 1

| 수락됨

답변 있음
using ODE45 with condition
You can use <http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html#f1-669698 event location> to run |od...

8년 이하 전 | 1

답변 있음
I have a for loop that makes one particle take 1000 random steps. How do i make this happen for 1000 particles?
This is a 2D random walk, and it helps to use variable names that reflect this. It is more efficient to generate a lot of random...

8년 이하 전 | 0

답변 있음
How to generate pn-sequence in matlab?
You might not have to reinvent the wheel. If you have the Communications Toolbox, you could use <http://www.mathworks.com/help/c...

8년 이하 전 | 0

| 수락됨

답변 있음
covariance of 3 D matrix
Probably what you need is in this discussion of <http://www.mathworks.com/help/mbc/mbccommandline/covariance.html covariance>.

8년 이하 전 | 1

| 수락됨

답변 있음
For loop of distance equation returning a confusing output
When something is going wrong, it's a good idea to look at the intermediate results. You could use the <http://www.mathworks.com...

8년 이하 전 | 1

| 수락됨

답변 있음
Attempt to reference field of non-structure array.
Suppose we start with the example from your link: array = [12 1 10 2 7 11 4 14 5 0 9 15 8 13 6 3]; To eliminate the zero...

8년 이하 전 | 0

| 수락됨

답변 있음
Implicit system not working
Guillaume, sorry that it has taken so long for someone to respond. If your goal is to find beta and theta for each value of ...

8년 이하 전 | 0

답변 있음
Indexing error in function code.
You'll get the same error with this code snippet: h = logical([1 0]); B(2*h) or, for that matter, just B(0) T...

8년 이하 전 | 1

답변 있음
Solving 4 equations and 4 unknowns - help please
I think that you are misinterpreting the theta-beta-M equation. It does not involve initial and final conditions because the bou...

8년 이하 전 | 0

답변 있음
Help me solve this non-linear equation.
Before using MATLAB, you should think about the math. Suppose that |y = x(1)*x(2)|. You are trying to solve sin(y) = 0 cos...

8년 이하 전 | 2

| 수락됨

더 보기