Respondida
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...

más de 15 años hace | 0

| aceptada

Respondida
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...

más de 15 años hace | 1

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

más de 15 años hace | 1

Respondida
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...

más de 15 años hace | 0

| aceptada

Enviada


LINECMENU
Utility for creating a standard uicontextmenu for line objects.

más de 15 años hace | 1 descarga |

5.0 / 5
Thumbnail

Respondida
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...

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 0

Respondida
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}...

más de 15 años hace | 0

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

más de 15 años hace | 0

Respondida
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')

más de 15 años hace | 10

| aceptada

Respondida
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 ...

más de 15 años hace | 0

Respondida
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...

más de 15 años hace | 0

Respondida
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). . . . *...

más de 15 años hace | 0

Respondida
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...

más de 15 años hace | 1

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

más de 15 años hace | 0

Respondida
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...

más de 15 años hace | 0

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

más de 15 años hace | 0

| aceptada

Respondida
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 ...

más de 15 años hace | 0

| aceptada

Respondida
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!).....

más de 15 años hace | 1

Respondida
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...

más de 15 años hace | 0

| aceptada

Respondida
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...

más de 15 años hace | 0

| aceptada

Respondida
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. ...

más de 15 años hace | 0

Respondida
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...

más de 15 años hace | 1

| aceptada

Respondida
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 ...

más de 15 años hace | 0

| aceptada

Respondida
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...

más de 15 años hace | 2

Respondida
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...

más de 15 años hace | 1

| aceptada

Respondida
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); %...

más de 15 años hace | 1

| aceptada

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

más de 15 años hace | 0

| aceptada

Respondida
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/...

más de 15 años hace | 0

Respondida
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 ...

más de 15 años hace | 36

| aceptada

Cargar más