답변 있음
X = a strophoid x=a(t2-1)/(t2+1), y=at(t2-1)/(t2+1), a>0, t=[-a,a].how to build a curve y (x) on the specified view.(blue dotted with marker type square)
On your line 4. you left out a dot. You should have: y = a*t.*(-1+t.^2)./(1+t.^2); However this will only give you two...

대략 10년 전 | 1

| 수락됨

답변 있음
problem with randsample when array with one element
That's what it is supposed to return. Read the website: http://www.mathworks.com/help/stats/randsample.html which stat...

대략 10년 전 | 0

답변 있음
Column size mismatch error using pdist2
You have taken the transpose of 'condition1oder2' which gives it 36 columns. That's a no-no for 'pdist2'.

대략 10년 전 | 1

답변 있음
How can I insert a row in the middle of a matrix/vector?
Suppose you want to insert the column vector y in the column vector x starting at index ix. x = [x(1:ix-1);y;x(ix,end)]; ...

대략 10년 전 | 2

답변 있음
How to write the equivalent of an 'until loop' in matlab?
To reproduce the equivalent of repeat --- until in C, do this: b = true; while b do the loop computations ...

대략 10년 전 | 2

답변 있음
Calculating mixed partial derivatives of a function A(x,y)
syms x y f(x,y) = x*sin(y); d2fdxdy = diff(diff(f,x),y); % = cos(y) Another way is: syms x y diff(x*sin(...

대략 10년 전 | 1

| 수락됨

답변 있음
Please I need the codes to how I can solve a random linear system of size n x n, using the tic and toc statements to fi nd how the Matlab linear solver scales with the problem size n.
The "n by n random linear system" you ask about refers to a random square matrix A of size n by n, a random column vector, b, of...

대략 10년 전 | 0

| 수락됨

답변 있음
Replace a zeros row with one under a condition very important for me
I'll just answer for your "First one" in getting "the same thing for the columns in A". Let x be a column in A. s = cumsum...

대략 10년 전 | 0

답변 있음
How to analyze a distribution parameters?
I fail to see what the difficulty is here. If x is a vector containing all the values of the parameter in question, then y is a...

대략 10년 전 | 1

| 수락됨

답변 있음
Hi, how do I compute f(x) = tan(x) at x=1 using the forward difference and the central difference. Using also h = 10^(-k), where k= 0,1,2,....,16.? I already did this but not too sure if it is correct.
You should beware of carrying out this computation as far as h = 10^(-16). Matlab's computation of 'tan' is only accurate to ab...

대략 10년 전 | 0

| 수락됨

답변 있음
how to convert from column to row ?
B = A.';

대략 10년 전 | 20

| 수락됨

답변 있음
Matlab Busy since four hours
Your method of appending columns to 'Result_matrix' is very time consuming. Also as Geoff points out, your creation of a new 'z...

대략 10년 전 | 1

| 수락됨

답변 있음
function to calculate summation in matrix
Instead of inserting ones into a pre-existing A of zeros, it is easier to generate A from scratch: A = []; for k = 1:s...

대략 10년 전 | 0

답변 있음
Turn imaginary numbers to complex
Your statement *"my Eigen values (l) are not of the form alpha+beta*i"* really isn't correct. They are both of that form where ...

대략 10년 전 | 0

답변 있음
I am trying to create a program in MATLAB that uses a while-loop to calculate the product of the values of all the elements of A when A=[10,11,12,13,14,15,16,17,18,19]. So far I have the following program:
If you are required to use a loop rather than a vectorized method, you can do this: f = 10:19; product = 1; for k ...

대략 10년 전 | 0

| 수락됨

답변 있음
Epsilon close solution to a trigonometrical system of equations.
The problem here is that you have more unknowns than equations. In such a case there is generally an infinite continuum of poss...

대략 10년 전 | 0

답변 있음
I do not understand why my k value won't increase to 3. Is there an error in my logic?
Your condition "del_z == lt*k" is too demanding. Your computer is using binary numbers to approximate decimal fractions. When ...

대략 10년 전 | 0

| 수락됨

답변 있음
how to draw circle with different radii in scatter plot?
Let P1 = [x1,y1], P2 = (x2,y2), and P3 = [x3,y3] be your three points. Then, interpreting your word 'intercepts' as meaning tha...

대략 10년 전 | 0

답변 있음
I have a data set of 400 columns and 644rows .I need to select columns 1,2,11,12,21,22,.....381,382,391,392 or move these particular columns in to a matrix.how can i write code for this in matlab
If M is the matrix with 400 columns, and if M2 is the matrix to be obtained from it, do this: n = 400; M2 = M(:,mod((1...

대략 10년 전 | 1

| 수락됨

답변 있음
Replace certain matrix values with zeroes (more complex than other similar questions)?
Let 'A' be your original matrix and 'G' be the goal matrix. m = size(A,1); n = sum(s); G = repmat(A,n,1); c = ...

대략 10년 전 | 1

| 수락됨

답변 있음
Length of intersection segment.
This is the problem that led to the classical problem of elliptic integrals. However, you can solve your problem numerically us...

대략 10년 전 | 1

| 수락됨

답변 있음
merging column elements into one
You can easily compress seconds, minutes, hours, days of the month, months, and years into one double precision floating point n...

대략 10년 전 | 0

답변 있음
How can I solve this equation and do not get RootOf in my answers?
There is a theorem in mathematics known as the Abel-Ruffini theorem that states that there is no explicit formula for general qu...

대략 10년 전 | 1

| 수락됨

답변 있음
why matlab is unable to solve these set of equations?
My suggestion would be to help out Matlab's 'solve' a little by the way the problem is approached. The sixth, seventh, and eigh...

대략 10년 전 | 2

| 수락됨

답변 있음
i have array cv which contains 16 rows & 2 columns. i need to find index of any one column. for ex, ans=2 or ans=1. i tried the following code. but it doesn't give the correct answer.please send the code.thank u sir.
I think what you meant to do is: ind = find(cv(:,z) == 2); % Gives indices of each element in column z which equals 2

대략 10년 전 | 0

답변 있음
Help with calculating median of an array without using built in function?
Next step: n = length(b); t = (n+1)/2; md = (b(floor(t))+b(ceil(t)))/2; % <-- median

대략 10년 전 | 1

| 수락됨

답변 있음
Finding a variable in a equation
The following obtains a least squares value for K: K = y/(exp(x/25)-1); I am assuming x and y are still row vectors her...

대략 10년 전 | 0

답변 있음
How to get smith form of a matrix in matlab
Use 'smithform' only in mupad. See <http://www.mathworks.com/help/symbolic/mupad_ref/linalg-smithform.html>

대략 10년 전 | 0

| 수락됨

답변 있음
Matrix Dimension must agree..
The error message is telling you what the trouble is. The vector x(i,:) has 1000 elements for each 'i', but p(i,:) was input an...

대략 10년 전 | 0

| 수락됨

더 보기