回答済み
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

さらに読み込む