답변 있음
Why doesn't this program work?
I don't see the problem?? The code appears to behave exactly how it is programmed. The one thing I think stands out is the com...

13년 초과 전 | 1

| 수락됨

답변 있음
How to convert a string of characters to numbers?
str = '1 0.013 0.0156 -0.104 0.0376 0.0624 0.132 0.132 Bla'; T = regexp(str,'-*\d*\.*\d*','match'); V = cellfun(@str2d...

13년 초과 전 | 0

| 수락됨

답변 있음
fsolve does not work when combining functions
Why won't this work? sumf = @(k) f1(k(1))+f2(k(2))+f3(k(3)); sumf([1 2 3].') fsolve(sumf,[3;1;2])

13년 초과 전 | 0

| 수락됨

답변 있음
Anyone know how to input a string into a for loop?
You should use a cell array instead of a character array: temp1 = {'1991/05/19 13:00:00','1991/07/19 13:00:00'}; t...

13년 초과 전 | 0

답변 있음
Help with GUI Table
This creates a table. Once it is created, edit some of the cells until you are content. T = uitable('data',magic(3),'colum...

13년 초과 전 | 0

| 수락됨

답변 있음
Replacing parts of a matrix randomly
Before your loop define: X = [3 4 5 7 8 9]; Then when to pick your b, simply do this: b = X(randi(6,1,1)); Thus ...

13년 초과 전 | 0

답변 있음
Uitable column with popupmenu format returns NaNs rather than selection
Try this out: fmt = {'A' 'B' 'C' 'D'}; uitable('Data',{'A';'A'},... 'ColumnEditable',true(1,2),... ...

13년 초과 전 | 1

| 수락됨

답변 있음
intersection of two tables question
A(all(~cellfun('isempty',B),2),:)

13년 초과 전 | 0

| 수락됨

답변 있음
Quick vectorization question (for loop)
I hope you are pre-allocating your mstd vector. Other than that, this is about 6 times faster. I didn't compare to stdfilt. ...

13년 초과 전 | 1

| 수락됨

답변 있음
how to rotate x-ticklabel for date?
Did you forget to download the function and put it in a folder that is on your path? <http://www.mathworks.com/matlabcentral/...

13년 초과 전 | 1

| 수락됨

답변 있음
How to use ISNAN function?
A = [3 nan 4]; isnan(A) Are you wanting to check whether i+2 or 11 is a nan? Well we know that 11 is not a nan, so let'...

13년 초과 전 | 2

답변 있음
Is randperm() consistent under different hardware platform, OS, MATLAB versions?
Let's test it out! What do you get? Post in a comment... % r2011b, Windows 7, 64bit maxNumCompThreads=4 rng(678) ...

13년 초과 전 | 0

답변 있음
Error: Undefined function 'plus' for input arguments of type 'cell'
You cannot add cell arrays, just as the error states. Cell arrays are a little different than numerical arrays, and you need to...

13년 초과 전 | 2

| 수락됨

답변 있음
Read blank row as 0
Blank rows are read as nans with xlsread. So use N(isnan(N))=0

13년 초과 전 | 1

답변 있음
Explicit integral could not be found.
Are you sure about those limits? Here is how one would ordinarily solve such a problem numerically. Note I use limits 1-y an...

13년 초과 전 | 0

답변 있음
How to construct a table with several matrices
The closest you can come is to put each element of each Sigma into the items in a popup. Sigma1 = [1 0.5; 0.5 1]; Si...

13년 초과 전 | 0

| 수락됨

답변 있음
All possible combinations (subgroups vary in size) of elements in a vector
This might be what you are looking for: <http://www.mathworks.com/matlabcentral/fileexchange/24185-partitions partitions> ...

13년 초과 전 | 1

| 수락됨

답변 있음
Assigning a value to a new iterate and keeping track of iterate numbers.
Don't program this way! Your code will be easy to break, hard to debug and slow. Use Cell arrays or structures instead. <h...

13년 초과 전 | 0

답변 있음
Can I return the values generated in the 'if'?
What loop? An IF statement is not a loop. Are you saying that you want to find out what x is passed to TestFunction by Run_Tes...

13년 초과 전 | 0

답변 있음
How to access the subfield of the variable(field type) stored in the array
This is not the way to store them in a structure. Instead you could do this: save('myvars') clear A = load('myvars...

13년 초과 전 | 0

| 수락됨

답변 있음
Double integration problem (can not use symbolic math tool box)
You have a couple of errors. One is you didn't define the base recursion functions to be functions but doubles - this is where ...

13년 초과 전 | 0

| 수락됨

답변 있음
My goal is to find how many times the iteration takes to have a tolerance of 10^-5 where g(x)=x
You need to switch the order of assignment of x0 and x1 inside the loop. You first define x1, then say x0=x1. So the differenc...

13년 초과 전 | 0

답변 있음
How to start using the Data Acquisition Toolbox?
What does this return: daq.getVendors

13년 초과 전 | 1

답변 있음
can any one solve the Integration of following expression?
Do you have the symbolic toolbox? If not, use the <http://integrals.wolfram.com/index.jsp online integrator> from Mathemati...

13년 초과 전 | 1

답변 있음
Distribute the subplots to two different figures
% First the subplots figure s(1) = subplot(1,2,1); plot(1:10) s(2) = subplot(1,2,2); ezplot('x.^2') % Now mo...

13년 초과 전 | 1

답변 있음
Generating random variables from normal distribution
A <http://mathworld.wolfram.com/NormalDistribution.html normal distribution> is defined that way. A normal distribution has num...

13년 초과 전 | 0

| 수락됨

답변 있음
Problem with uiwait and uiresume
You need to update the structure with the GUIDATA function. guidata(gcbf,handles)

13년 초과 전 | 0

답변 있음
How to make integral of Hankel function at infinite?
This one is easy. Because: besselh(1,0,x) % Zero for all x. we know the integral from 0 to inf is 0.

13년 초과 전 | 0

답변 있음
How to import equation from GUI to functions?
Here is an example. Paste the code into a new M-file and run it. In the text box you can enter an equation which depends on x,...

13년 초과 전 | 1

| 수락됨

답변 있음
Can I plot rectangles without rescalling axis limits?
You need to post complete example code. I see no problems with this: ezplot(@sin) hold on rectangle('Position', [...

13년 초과 전 | 0

| 수락됨

더 보기