답변 있음
round robin Loop.... help plz
You're never updating |totalCPUtime| so your |while| loop never exits

14년 초과 전 | 0

| 수락됨

답변 있음
runge-kutta
Writing a new answer so that I can use markup (MathWorks, please fix this!!). You need a couple of things - first, the time valu...

14년 초과 전 | 2

| 수락됨

답변 있음
Please help..About probability ?
You can do all of your dice throws with a single call to |randi| like this: randi(6, 2, n) that should get you on your w...

14년 초과 전 | 0

| 수락됨

답변 있음
Writing a sin function program dealing with factorials, help in editing and error?
I take it this is a programming exercise, not a straight mathematics question - you can work out the number of terms pretty easi...

14년 초과 전 | 0

답변 있음
How to create non-repetitive random integers
randperm(100, 70)

14년 초과 전 | 1

답변 있음
Where do people learn "bad" programming habits (i.e., goto, global, and eval)
At my university it's usually the engineering school's fault. When students learn to solve ODEs with MATLAB they seem think the ...

14년 초과 전 | 2

답변 있음
Calculating the volume inside an arbitrary closed surface
If you have R2012a doc integral2 Otherwise doc quad2d

14년 초과 전 | 0

| 수락됨

답변 있음
Index exceeds matrix dimensions.
The line you want is: vtemp = [xtemp,ytemp]; |xtemp| and |ytemp| are numbers not vectors

14년 초과 전 | 0

| 수락됨

답변 있음
Unknown Error
The fourth argument to |csvread| should be a range, i.e. a vector with four entries. You have |'eof'|. Try removing this argumen...

14년 초과 전 | 0

답변 있음
Simple Constraint Question for Quadprog Problem
As far as I can understand your code, you have a constraint that the sum of |x| is 1, and hence the required constraint is that ...

14년 초과 전 | 0

답변 있음
i dunno why it run until 4th iteration then stopped...can anybody help me? it did not give any error...
OK, with the disclaimer that what you have there isn't a particularly optimal way to write this code, you can fix your problem b...

14년 초과 전 | 0

| 수락됨

답변 있음
How to plot Message Signal using MATLAB ?? (Quick Question Need Help)
First, note that the integral of the message will be zero up to any multiple of 2*pi. The integral will then be a piecewise line...

14년 초과 전 | 1

| 수락됨

답변 있음
How to plot Message Signal using MATLAB ?? (Quick Question Need Help)
m_1 = @(t) 2*(cos(t) >= 0) - 1 t = linspace(0, 100); stairs(t, m_1(t))

14년 초과 전 | 1

답변 있음
i dunno why it run until 4th iteration then stopped...can anybody help me? it did not give any error...
It stops because |dv1| drops below its threshhold, causing the loop to quit.

14년 초과 전 | 0

답변 있음
i dunno why it run until 4th iteration then stopped...can anybody help me? it did not give any error...
You're going to struggle to get someone to answer (let alone read) this question. I would suggest using the debugger to step ...

14년 초과 전 | 0

답변 있음
Output of mod() for large input
@Walter Roberson is correct, in R2012a MATLAB automatically casts the number into a |uint64|. For this piece of code [mod(2...

14년 초과 전 | 0

| 수락됨

답변 있음
surface integral of discrete data
Sorry, I read your question too fast and pointed you to code for surface *area*, not surface integral. In this case it's even ea...

14년 초과 전 | 0

답변 있음
How can I solve this linear System?
And another way (which could be chained into a very long one-liner). First, assuming you have the following test data: % Te...

14년 초과 전 | 2

답변 있음
'closeness' of multiple vectors
Is closeness a measure of how many entries match in matching positions? In this case: closeness = @(x, y) nnz(x == y) / num...

14년 초과 전 | 0

| 수락됨

답변 있음
How to assign parts of a matrix equal to a single vector
It's because |y(2:4, 2:4)| is a 3x3 matrix, and so you must assign it a 3x3 matrix. The command |repmat| is an easy way to stack...

14년 초과 전 | 0

| 수락됨

답변 있음
Additional ODE solvers in Matlab?
You could try sundials <https://computation.llnl.gov/casc/sundials/main.html>, they have a suite of good solvers and provide a M...

14년 초과 전 | 0

| 수락됨

답변 있음
How to replace some of the value in the matrix with NaN?
This is another one of these problems where the simplest way to solve it is to randomly generate candidates until you find one t...

14년 초과 전 | 0

답변 있음
runge-kutta
I'll give you the high level overview, you'll need to write the code though # Turn it into a system of two first order equati...

14년 초과 전 | 3

답변 있음
surface integral of discrete data
This came up recently -- in this thread there is code for computing the surface area based on dividing a regular mesh into trian...

14년 초과 전 | 0

답변 있음
extracting a 2d plane from a 3d surface plot
How about contour(x, y, z1-z2, [0 0]) ?

14년 초과 전 | 1

| 수락됨

답변 있음
How to "stretch" matrix
Further to Image Analyst's answer, you can do it without the image processing toolbox too (assuming m has an even number of entr...

14년 초과 전 | 1

답변 있음
extracting a 2d plane from a 3d surface plot
Plotting the plane is pretty easy surf(x, y, zeros(size(x)) You can adjust colour, edgecolor, transparency etc if you wa...

14년 초과 전 | 0

답변 있음
Strange problem - vector dimensions
My guess is that there is a variable called 'A' in your 7th m-file. What if you call your array AAA (to avoid naming conflicts) ...

14년 초과 전 | 1

| 수락됨

답변 있음
Help with finding and plotting interpolating polynomials
I presume you mean c0 + c1x + c2x^2 + c3x^3 + c4 x^4 + c5 x^5 The system of equations method means treating c0 ... c5 as unkn...

14년 초과 전 | 0

답변 있음
How to sample from custom 2D distribution?
A really basic, quick to code (but darned inefficient way) is to generate uniform samples in the 3D volume defined by the x and ...

14년 초과 전 | 1

더 보기