回答済み
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! % %...

約15年 前 | 0

回答済み
fprintf
Something like this: fprintf('Mass\t\tTime\t\tError\n')

約15年 前 | 1

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
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...

約15年 前 | 0

回答済み
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 ...

約15年 前 | 0

回答済み
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; ...

約15年 前 | 3

| 採用済み

回答済み
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.

約15年 前 | 3

| 採用済み

回答済み
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! >...

約15年 前 | 1

回答済み
Generate a series
linspace(0,100,40)

約15年 前 | 1

| 採用済み

回答済み
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(...

約15年 前 | 0

| 採用済み

回答済み
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'...

約15年 前 | 0

| 採用済み

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
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...

約15年 前 | 0

回答済み
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...

約15年 前 | 0

回答済み
milliseconds
ms = s*1000

約15年 前 | 2

回答済み
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: ...

約15年 前 | 2

回答済み
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....

約15年 前 | 0

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

約15年 前 | 2

| 採用済み

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

約15年 前 | 0

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
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:...

約15年 前 | 1

| 採用済み

回答済み
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...

約15年 前 | 2

| 採用済み

回答済み
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...

約15年 前 | 1

回答済み
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...

約15年 前 | 1

| 採用済み

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
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...

約15年 前 | 0

| 採用済み

回答済み
Multiply large matrix by scalar - speed issue
help mex

約15年 前 | 0

回答済み
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...

15年以上 前 | 1

回答済み
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...

15年以上 前 | 0

さらに読み込む