Beantwortet
Find the roots of an expression
<http://www.mathworks.com/help/techdoc/ref/fzero.html FZERO> can be used to find roots. Dw = 0.0000076; S = 0.000239; r...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Using the find function in a loop
Is it possible that your find command is returning multiple results? If so, putting multiple results into a single element of a...

mehr als 15 Jahre vor | 1

Beantwortet
matrix pre-allocation
There are cases where loops are much faster than other alternatives. This can sometimes be difficult to predict ahead of time, ...

mehr als 15 Jahre vor | 1

Beantwortet
sequence grouping
Does this do what you are wanting? Lp = length(piv); G = ones(Lp,2*Lp+1); G(:,1) = piv-Lp; G = cumsum(G,2); D{1} = m...

mehr als 15 Jahre vor | 0

| akzeptiert

Gesendet


LINECMENU
Utility for creating a standard uicontextmenu for line objects.

mehr als 15 Jahre vor | 1081 Downloads |

5.0 / 5
Thumbnail

Beantwortet
Passing data between two different GUI windows
Assuming you are using GUIDE to generate your GUIs, you can simply use the tag of the editbox in the first GUI to find it in the...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
how to connect dots
What dots? You need to be _way_ more specific to get any advice for this issue...

mehr als 15 Jahre vor | 0

Beantwortet
Indexing matrix in matlab
You could put them into a cell array: C = {magic(3) ones(3) zeros(3) magic(3) magic(3) ones(3)*6 zeros(3)}; isequal(C{1}...

mehr als 15 Jahre vor | 0

Beantwortet
Plotting Edge Data on Mesh Plots
You could use PATCH to specify the edges.

mehr als 15 Jahre vor | 0

Beantwortet
Displaying text in the command window when running a program
What do you want to display? You can use the DISP command without a variable. disp('At line 50')

mehr als 15 Jahre vor | 10

| akzeptiert

Beantwortet
Compactly display a matrix
For this kind of thing I wrote my own custom display function, which uses the FPRINTF command for the formatting. I don't know ...

mehr als 15 Jahre vor | 0

Beantwortet
Loop, function or memory problem: Loop variable in a function is limited automatically.
Hmm, something weird is going on. Can you verify that this works at the command line: for ii = 1:512*512*100,jj = ii/2;end,jj...

mehr als 15 Jahre vor | 0

Beantwortet
Subtract corresponding nonzero element from each element in a vector
Try this for speed. On my machine it is much faster than the double BSXFUN call. I assume random V1 (your Vect1). . . . *...

mehr als 15 Jahre vor | 0

Beantwortet
Write a program that calculates sum of the integers numbers
The product would be the sum of the even integers from 2 to 30 ;-). Seriously, what have you tried so far on this homework pro...

mehr als 15 Jahre vor | 1

Beantwortet
Why are questions showing up with WRONG authors?
Bad link, I think...

mehr als 15 Jahre vor | 0

Beantwortet
Error: File: cftool.m Line: 355 Column: 33 Unexpected MATLAB operator
All that those tildes mean is the input arguments are not used in the function. Try changing the code to this: function adju...

mehr als 15 Jahre vor | 0

Beantwortet
extract numbers from a cell array
N = cellfun(@(x) str2double(x(13:16)),G) % G is your cell array.

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Plotting a variable as a function of the iteration number in a for loop
Here is an example. Note that if your loop index is 1-to-N, then you won't need the loop counter and this can be simplified in ...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
How to create a (nxn) matrix with alternating sign
Here is another which works for even or odd n. M = toeplitz((-1).^(1:n)); And even faster (very much so for large n!).....

mehr als 15 Jahre vor | 1

Beantwortet
Problem in drawing
I get a graph, why do you say you don't get a graph? You don't say what to use for the requested input, so I used 10000. Is th...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Create a function to calculate hyperbolic's then graph them?
About the only thing you might want to change is to put a call in to the HOLD function so that all plots appear on the same axis...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Solving using Euler method
What is 'i'? In MATLAB , 'i' and 'j' are functions. This is one reason why it is recommended not to use them as loop indices. ...

mehr als 15 Jahre vor | 0

Beantwortet
Pe versus the signal amplitude A
Did you mean to plot: semilogy(A.',P,'b.-'); Also, I would recommend you not name your variables the same name as MATLAB fu...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
Connected Pop-ups
Yes it is possible. STR = {'a';'b';'c'}; % Use for popup1; STR2 = {{'f';'g';'h'};{'i';'j';'k'};{'l';'m';'n'}}; % popup2 ...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
Help in n factorial!!!
What do you mean you don't understand the question? I find this very difficult to believe. You know what it is to write a prog...

mehr als 15 Jahre vor | 2

Beantwortet
Find first 1 of the first sting of 1s who's length exceed the length of every subsequent string of 0s
Here is a function which seems to always work, and is fast. I have had trouble with Walter's solution returning wrong results o...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
How do write a function within the same main code
Put all of this into one M-file. Then call it like this: get_sub(5) function [OUT] = get_sub(A) OUT = subfun(A); %...

mehr als 15 Jahre vor | 1

| akzeptiert

Beantwortet
Integration help (quad)
Why not use an anonymous function instead? >> y = @(th) cos(th).*sin(th); % The function to integrate... >> q = quad(y,0...

mehr als 15 Jahre vor | 0

| akzeptiert

Beantwortet
How to find a code for 1 D convection diffusion equation?
A good place to start is the FEX. I pulled this one up after one search. <http://www.mathworks.com/matlabcentral/fileexchange/...

mehr als 15 Jahre vor | 0

Beantwortet
How do I vary color along a 2D line?
This is one of the classic 'tricks' of MATLAB graphics. x = 0:.05:2*pi; y = sin(x); z = zeros(size(x)); col = x; % This is ...

mehr als 15 Jahre vor | 36

| akzeptiert

Mehr laden