Réponse apportée
rectangular basis function/ rectangular pulse
Your description is a little unclear. Here is a function which will do something similar to what your first sentence asks. ...

environ 15 ans il y a | 0

Réponse apportée
Isolate Digits in a number
If c is not a char, then what is it? How could you even enter c in MATLAB if it is not a char? You will lose the leading zero...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
plot and hist in matlab
Two histograms: x = -2.9:0.1:2.9; y = randn(10000,1); hist(y,x) h = findobj(gca,'Type','patch'); set(h,'FaceColor...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
vector not produced missing some '.' ?
As a general rule when dealing with operations on arrays, use a dot before every one of the three operators: * / ^ If you d...

environ 15 ans il y a | 0

Réponse apportée
Truncating fractions
Ar = round(A*100)/100 . . . *EDIT* Raviteja, the above command does store your values as you want. The problem is not ...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
compute numerical integral by matlab
Put the function in an <http://www.mathworks.com/help/techdoc/matlab_prog/f4-70115.html anonymous function>, then use <http://ww...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Changing color of point in stem plot based on value
No, but that doesn't mean you can't get what you want. t = (-3*pi:.1:3*pi); y = round(sin(t)*5)/5; idx = y~=0; ...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
slow re-assignment of values to an array in a structure
Sorry, at first I didn't read the whole question. My guess is that line 5 doesn't actually copy the data in x. When you chan...

environ 15 ans il y a | 4

| A accepté

Réponse apportée
Writing Callback For GUI
Where would you get the values for the functions? If you are wanting to get them from other uicontrols (editboxes, for example)...

environ 15 ans il y a | 0

Réponse apportée
patch in GUI (rectangular parallelepiped)
<http://www.mathworks.com/matlabcentral/fileexchange/20845-rppd>

environ 15 ans il y a | 0

Réponse apportée
reshape
Go into sym_rec_img_preprocess and put these right before line 32: size(Ibox) size(sizer) size(sizec) noimages ...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Sorting matrices
[As,I] = sort(A); Bs = B(I); To sort along the rows, use the dim argument to <http://www.mathworks.com/help/techdoc/ref/sor...

environ 15 ans il y a | 3

| A accepté

Réponse apportée
Doubt math
What do you mean "without math methods?" MATLAB uses _only_ math methods as far as I know...

environ 15 ans il y a | 2

Réponse apportée
Printing function results to the Workspace
You get that error because you haven't given the function any output arguments. So let's give it one! function R = range(x...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Using a variable where a string is required
If you want to use the built-in plot colors, do (for example): A = {'k','b','r','g','y','c','k','b','r','g','y','c'}; x =...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
NaN for zero divide by zero.
There are two things to remember when looking at this problem. 1. A function having a <http://mathworld.wolfram.com/Limit.html...

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Plot, if and elseif statement
IF statements _do not_ pick out elements of an array as you are thinking they do. Use logical indexing. x = 0:pi/10:2*pi; ...

environ 15 ans il y a | 1

Réponse apportée
Apostrophes in Cell
Use a double apostrophe everywhere you want one.

environ 15 ans il y a | 0

Réponse apportée
MATLAB in unexpected places
I do see the logo on other vehicles once in a while. If you see the logo on the back of a silver VW EuroVan with Idaho plates, ...

environ 15 ans il y a | 1

Réponse apportée
improper integral
quadgk(@(x) fun(x,0,1),-inf,inf) % 0 is a, 1 is b. But for a = 0, b = 1, we encounter an infinite number or nan. Are the...

environ 15 ans il y a | 0

Réponse apportée
Place each dimension of matrix into a cell array
B = squeeze(mat2cell(A,2,2,[1 1])) This is probably quicker: mat2cell(reshape(A,2,4),2,[2 2]) More generally: A(:,:,...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
loops in matlab
Show what you have done so far... and where you are stuck.

environ 15 ans il y a | 1

Réponse apportée
Problem using LineStyle
That is because you are using the LineStyle property to try to change the Color property. L = plot(1:10); set(L,'linestyle'...

environ 15 ans il y a | 0

Réponse apportée
Determine if mouse click on a plot is within plot region
Here is a way to do it programmatically, as in a GUI for example. Save this in an M-file then run the M-file. Click on the axe...

environ 15 ans il y a | 1

Réponse apportée
Polynomial curve fitting
You did it correctly. The curve is linear between the points because that is how MATLAB plots these things. If you zoom in hig...

environ 15 ans il y a | 1

| A accepté

Réponse apportée
Two Arrays Addressing a Matrix
What does this mean: R(p,t)? Are you saying that R is a 2-by-N array? Why use p and t? . . *EDIT* O.k., so then do: ...

environ 15 ans il y a | 0

Réponse apportée
need help with array as input parameter of a function
I have never seen that error message before. How are you calling the function? BTW, what version of MATLAB are you using?

environ 15 ans il y a | 0

Réponse apportée
Logical Indexing Question
Please go back and format your question using the {} Code button. How can you form th2/ph2 when they are different sizes?

environ 15 ans il y a | 0

Réponse apportée
Applying limits in matlab
Displacement = min(400,X); For example: X = [1:20:800]; plot(min(X,400)); ylim([0 800])

environ 15 ans il y a | 0

| A accepté

Réponse apportée
Creating a function
1. Do you think that copying and pasting a few obvious homework problems will get much of a positive response? From your post ...

environ 15 ans il y a | 1

Charger plus