Respondida
summing the ith frequencies with the ith amplitudes^2 from a spectrogram of a Harmonic
It is not the vector that is being squared, but each component. A = [1 2 3 4]; A.^2 % Notice the '.' - it matters! % %...

alrededor de 15 años hace | 0

Respondida
fprintf
Something like this: fprintf('Mass\t\tTime\t\tError\n')

alrededor de 15 años hace | 1

Respondida
Bulk concatenation of cell array contents (without looping)?
There may be a way to do it with no loops, but I think this is fast anyway. Here is a full example. Just change the numbers ac...

alrededor de 15 años hace | 0

| aceptada

Respondida
subdivide the axis into a grid without using subplot
Are you certain that your patch objects wouldn't just stack and obscure each other? In your example (assuming appropriate adjus...

alrededor de 15 años hace | 0

Respondida
Solving large linear systems, Ax = b
I recommend you read this whole post, and pay _particular attention_ to the comments by Tim Davis at the end. He co-wrote some ...

alrededor de 15 años hace | 0

Respondida
transparent plot
Not with a line object, but you can use an old graphics 'trick' to get it done: % Your data... x = 1:10; y = x.^2; ...

alrededor de 15 años hace | 3

| aceptada

Respondida
How to change the step value of a for loop during execution
You cannot change this once the loop starts. Instead use a WHILE loop and have the increment depend on an IF statement.

alrededor de 15 años hace | 3

| aceptada

Respondida
convert zeros to nan
Please do these three commands on your machine and paste the output, just like I did. Remember to use the {} Code button! >...

alrededor de 15 años hace | 1

Respondida
Generate a series
linspace(0,100,40)

alrededor de 15 años hace | 1

| aceptada

Respondida
Input/Output Function's, need content and display help
Here is how I would do it, if I was going to write to the file then display the file contents in two steps... fid = fopen(...

alrededor de 15 años hace | 0

| aceptada

Respondida
how to make only one image as input for all buttons in gui?
Yes, it is possible. Once the user has selected an image, set the 'enable' property of the image selection button to 'inactive'...

alrededor de 15 años hace | 0

| aceptada

Respondida
Using a for loop to fill up a matrix
Please go back and format your code using the '{} Code' button. *EDIT* Thank you for (partially) formatting your code! There...

alrededor de 15 años hace | 0

| aceptada

Respondida
Changing grid lines to a solid line instead of dashed
Set the gridlinestyle property. set(gca,'gridlinestyle','-') As Matt Tearle has pointed out, you cannot change the grid line...

alrededor de 15 años hace | 0

| aceptada

Respondida
How to define line colour in zplane plotting
To change the color of the lines easily with a mouse click, you could use <http://www.mathworks.com/matlabcentral/fileexchange/3...

alrededor de 15 años hace | 0

Respondida
Memory Issues: Almost like clear doesn't fully work
How are you clearing the files? Are you using FCLOSE and checking the return variable? *EDIT* I am not certain that clearing...

alrededor de 15 años hace | 0

Respondida
milliseconds
ms = s*1000

alrededor de 15 años hace | 2

Respondida
can't save image with transparent background
I don't know what you are doing wrong but I rarely ever rely on MATLAB to get these kinds of things right. I use this instead: ...

alrededor de 15 años hace | 2

Respondida
How to get rid of white box in figure exported from Matlab to eps format?
I recommend you abandon the built-in MATLAB export function and go for this award-winning FEX submission: <http://www.mathworks....

alrededor de 15 años hace | 0

Respondida
getting the axis position correctly
What changes is the tightinset property and plotboxaspectratio. figure,plot([0 1], [0 1]) axis equal AxesHandle=findobj(...

alrededor de 15 años hace | 2

| aceptada

Respondida
periodic functions
Yet another approach: x1 = .5; % x1 in image amp = 3; % amplitude n = 3; % number of periods. x = [reshape(bsxfun...

alrededor de 15 años hace | 0

Respondida
CONNECT TWO .FIG IN GUI
What do you mean by "link two .fig windows" exactly? Do you mean you want to pass data from one figure to another via a pushbut...

alrededor de 15 años hace | 0

| aceptada

Respondida
Plotting Rotated Error Ellipses
Please go back and format your code using the {}Code button. *EDIT* Thanks for making your code readable! Change this line:...

alrededor de 15 años hace | 1

| aceptada

Respondida
lag with "figure" function
I have no idea why you are experiencing this huge delay. I put your exact code into an M-File and saved it. Then, pasting your...

alrededor de 15 años hace | 2

| aceptada

Respondida
How to implement a 'speed limit' for GUI button press?
Just set the 'enable' property to 'inactive' as the first command of the callback, then as the last command, set the 'enable' pr...

alrededor de 15 años hace | 1

Respondida
multiple matrix manipulation with different size matrices
It looks like you are basically doing a 2D convolution: C2 = conv2(B,A,'valid'); % Look at the corners...

alrededor de 15 años hace | 1

| aceptada

Respondida
Saving existing matrix
Why would P exist sometimes and not others? If it is created somewhere in the loop, presumably an IF statement or other such br...

alrededor de 15 años hace | 0

| aceptada

Respondida
What's wrong with this code?
The code runs fine, what problem are you trying to solve? *EDIT* . . Try this. clear all %% Initialization of Parame...

alrededor de 15 años hace | 0

| aceptada

Respondida
Multiply large matrix by scalar - speed issue
help mex

alrededor de 15 años hace | 0

Respondida
Speed up a "logical matrix multiply"
For larger arrays, this should be faster. For even larger arrays, perhaps a transpose of A first would speed things up more. I...

más de 15 años hace | 1

Respondida
align problem in multiple axes
When I run your code, with some made-up values for time, std, xcolor, leftcolor and t, I don't see any problem. How about you p...

más de 15 años hace | 0

Cargar más