Réponse apportée
A function to draw a circle with only radius as parameter?
function [] = plot_circle(R) % Plots a circle of radius R [X,Y] = cylinder(R,1000); plot(X(1,:),Y(1,:)) axis equal...

plus de 13 ans il y a | 1

Réponse apportée
swap letters 2 by 2 in a string.
S = 'abcdefg' S = S([2 1 4 3 6 5 7]) Or, generally: for ii=1:2:numel(S)-mod(numel(S),2),S([ii,ii+1])=S([ii+1,ii]),e...

plus de 13 ans il y a | 1

Réponse apportée
imshow command not found
Apparently you do not have the IPT installed. Did you purchase this toolbox with MATLAB? You might have to talk to the system ...

plus de 13 ans il y a | 1

Réponse apportée
'eval' works on one computer but not on the other....
On the computer where it does not work, do this: which cd See if someone has saved a script named cd that is masking the...

plus de 13 ans il y a | 0

Réponse apportée
How do I deal with large modulus in mod function that produces a wrong result?
I would say you have to go symbolic. mod(sym(A),sym(B))

plus de 13 ans il y a | 0

Réponse apportée
Left - Rigth - double click on a plo
Look at this example for how to use this property. function [] = figselect() % Click in the axes figure('windowbu...

plus de 13 ans il y a | 0

Réponse apportée
Cell array....searching without a loop?
Post a simple, small example of the FOR loop you have been using to solve the problem. Say A = {rand(5,3,2);rand(5,3,2);r...

plus de 13 ans il y a | 0

Réponse apportée
Radio button panel prblm
In your Least_Sqaure_Optimization_OpeningFcn put this: set(handles.uipanel1,'SelectedObject',[]) Where uipanel1 is the...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
How can i skip iterations in for loop
Why not just give up on the FOR loop and use a WHILE loop? That way you control when to increment the index the whole time! As...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
what is global nummod
Why don't you ask the author. Hist email contact is listed on this page: <http://www.clear.rice.edu/elec301/Projects01/>

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Cool examples of how Matlab is useful
I would humbly submit this code I wrote for my M.S. in Mechanical Engineering. It calculates the resonant frequencies and plot...

plus de 13 ans il y a | 3

Réponse apportée
get a matrix of only zero
A = zeros(2,5)

plus de 13 ans il y a | 0

Réponse apportée
uicontrol assigning values a a user defined date
Here is one way to make the code return a value. function [userdate]= datepicker (~) figure('units','pix',... ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Trying to create an array of Matrices
Use t{i} instead of t(i)

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
Why quad function can't communicate with my subfunction?
If that is the error message, communication is not the problem. Re-read the message.... there is a problem with what your funct...

plus de 13 ans il y a | 0

Réponse apportée
Why does this error occur when using simplify?
Because you are misusing the function. I think you want this: syms x eq = 3.1*cos(sin(x))*tanh(x) simplify(eq) % T...

plus de 13 ans il y a | 0

Réponse apportée
problem with combvec, allcomb
This will solve your problem. function M = expand_vects(A) % A is a cell array of 1-by-n vectors where n need not ...

plus de 13 ans il y a | 0

Réponse apportée
find simlar number in array
Similar or identical? Those are different! .5 is similar to .6, but not identical. If you mean identical, you can count how...

plus de 13 ans il y a | 0

Réponse apportée
Create changing variable names inside a loop
Don't program this way in MATLAB! Please take the time to learn proper programming techniques for the language you are using. ...

plus de 13 ans il y a | 0

Réponse apportée
Reading from GUI edit boxes using a self made function
Where is that function located? Is it in the GUI m-file or a separate m-file? From where are you calling it? Are you calling ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
how to solve unknown coefficents in matrixs
Use the NULL command. A =[1 2 3;3 4 5]; X = null(A); A*X %Check

plus de 13 ans il y a | 0

Réponse apportée
Averaging a Random Walk with Numbers Spanning [-1,1]
Wouldn't this be easier? T = 2*rand(1,10)-1; Num_change = sum(logical(diff(sign(T))))

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Entering a whole word into an arary.
This works whether your user enters only commas between words, only spaces, or both (even colons or semicolons!). I test it out...

plus de 13 ans il y a | 1

| A accepté

Réponse apportée
change shorkeys "ctrl+shift+0" for editor
Why not just Alt+Tab your way through?

plus de 13 ans il y a | 1

Réponse apportée
append elements to a vector
The usual way to do it is something like this. v = []; for ii = 1:3 v = [v ii:4]; end v % Show v ...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
Array lengths and loops.
Couple of things. It looks like you are masking both the LENGTH function and the I function with a variable. Don't do that - c...

plus de 13 ans il y a | 0

Réponse apportée
Legends display incorrect markers
I would dispense with keeping track of all that stuff anyway. Switching current figures in a loop, keeping track of handles, ca...

plus de 13 ans il y a | 0

| A accepté

Réponse apportée
How do I create a set of 20 random binary numbers (only 0 and 1) but such that 0 or 1 does not repeat 4 times in a row?
Some methods proposed here don't seem to generate 'random' vectors. Here is an approach that is perhaps 'more random' than some...

plus de 13 ans il y a | 0

Réponse apportée
Spaces for readability in code
Here is how I do it: plot(rand(1,1,1) + 17/2,'r*') A = (rand(1,5) - 3) + bsxfun(@(x,y) x+y,Z,U) - cellfun('length',M{:...

plus de 13 ans il y a | 0

Réponse apportée
How can I count one matrix in big another matrix ?
There may be something in the IPT that does this, or you can try this FEX file out: <http://www.mathworks.com/matlabcentral...

plus de 13 ans il y a | 0

Charger plus