Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 1

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

environ 15 ans il y a | 1

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

A soumis


LINECMENU
Utility for creating a standard uicontextmenu for line objects.

environ 15 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

Réponse apportée
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...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
how to connect dots
What dots? You need to be _way_ more specific to get any advice for this issue...

environ 15 ans il y a | 0

Réponse apportée
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}...

environ 15 ans il y a | 0

Réponse apportée
Plotting Edge Data on Mesh Plots
You could use PATCH to specify the edges.

environ 15 ans il y a | 0

Réponse apportée
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')

environ 15 ans il y a | 10

| A accepté

Réponse apportée
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 ...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
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). . . . *...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 1

Réponse apportée
Why are questions showing up with WRONG authors?
Bad link, I think...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 0

Réponse apportée
extract numbers from a cell array
N = cellfun(@(x) str2double(x(13:16)),G) % G is your cell array.

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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!).....

environ 15 ans il y a | 1

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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. ...

environ 15 ans il y a | 0

Réponse apportée
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...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 15 ans il y a | 2

Réponse apportée
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...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
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); %...

environ 15 ans il y a | 1

| A accepté

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

environ 15 ans il y a | 0

| A accepté

Réponse apportée
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/...

environ 15 ans il y a | 0

Réponse apportée
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 ...

environ 15 ans il y a | 36

| A accepté

Charger plus