Answered
how to show images in GUI matlab
mutia - maybe you should just start over with a brand new GUI. I created a very simple one with two axes and a button (I left a...

12 years ago | 3

Answered
Question regarding matrix index
If *Z* is your matrix from above, just do: [minVal,minIdx] = min(Z(:,end)); This will return the minimum value in *minVal...

12 years ago | 0

Answered
How to I write modified image data to a new file?
A similar question was asked at <http://www.mathworks.com/matlabcentral/answers/101413-how-can-i-add-text-to-an-image-and-make-t...

12 years ago | 0

Answered
I need to solve this error: Attempted to access CC(:,2); index out of bounds because size(CC)=[9,1].
The error message is pretty clear in what the problem is - the code is trying to access the second column of *CC* when there is ...

12 years ago | 0

| accepted

Answered
Is it possible to take inputs as several sets?
Since you are assuming that every triplet corresponds to an (x,y,z) coordinate, then just extract all the x-, y- and z-coordinat...

12 years ago | 0

| accepted

Answered
A(I) = B, the number of elements in B and I must be the same.
The error is at line 171 of your code (as per the error message) theta(i+1) = theta_ast; You could debug this to see what...

12 years ago | 0

Answered
Changing save name for text file
Given your comment as to the return value for *answer* in Sara's response to your question, I almost think that *answer* is a _c...

12 years ago | 0

Answered
How can I divide the y-axis of a plot into two different color regions?
You could try to use the *area* command to fill in the regions beneath the curve in multiple colours. For example, if your data...

12 years ago | 0

| accepted

Answered
String value and sequently representation
*M* is a matrix with a single row, so the code cannot access anything but that first row. As soon as *i* is greater than 1, the...

12 years ago | 0

| accepted

Answered
z-transform of unit step function?
I don't have the Symbolic Toolbox but I think that the provided answer is correct. If x[n] = 0.5^n * u[n] => x[n] = {…,0,...

12 years ago | 0

| accepted

Answered
save while runing loop
Hi André - a couple of things: the above doesn't run because of the missing bracket at the end of the second line in ind_res...

12 years ago | 0

| accepted

Answered
how to arrange xtick position.
If you want the first month (Jan) to start closer to zero, the placement of the x-axis ticks must be adjusted. The default widt...

12 years ago | 0

| accepted

Answered
connect to Bloomberg automatically
You can try to add the *javaaddpath* command to the MATLAB startup file (see <http://www.mathworks.com/help/matlab/ref/startup.h...

12 years ago | 1

| accepted

Answered
How to read data from xml files? (Loop all Parent and child nodes and get entire data to Excel)
Varun - what code do you have so far? If you have an xml file, then you can read the data from it with *xmlread* ( <http://www....

12 years ago | 0

Answered
How to extract the data from .nc file based on lat,lon ?
According to the *ncread* command documentation (type *help ncread* in the Command Window) the *START* and *COUNT* inputs are de...

12 years ago | 0

| accepted

Answered
syntax error on a while loop
The bug in the code is at line: min(DC1(:,450:(c-1))),DC1(1,j) with the comma being the culprit. The *DC1(:,450:(c-1))* ...

12 years ago | 1

Answered
Plot a circle on a 2D grid
Please see the MATLAB Wiki entry <http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F> for several options on drawing c...

12 years ago | 1

Answered
points id and scatter markers distance adjustment in figure.
Yes, it just depends on how you feel about using global variables. (This is just something I looked at for the first time, so t...

12 years ago | 0

| accepted

Answered
Simple calculations giving high imprecisions
cyril - I think that there is a sign mismatch in the calculation of *C*. Rather than C = y1-B/(y2-y1); it should be ...

12 years ago | 0

| accepted

Answered
how can i estimate the period of a signal exist in a loaded file?
The first thing that you can do, is to plot the signals: load sig_period.mat figure; plot(s1); figure; plot(s2)...

12 years ago | 0

Answered
Writing an output to a text file
The code is missing the statement to write the data to the file using the file descriptor *fid*. Try instead: fprintf('%d ...

12 years ago | 1

Answered
How can I save an entire matrix?
At each iteration, you can save the result of *M\N* to a matrix (if all these results are of the same dimension 2x1) or to a cel...

12 years ago | 0

| accepted

Answered
sequence probability in a vector
Since your 200 points vector contains four distinct numbers (1-4) then I would consider creating a 4x4 matrix where element (i,j...

12 years ago | 0

Answered
How do to handle the case, when the string to be encrypted using AES is less than 16 bytes?
If the string (to encrypt) is less than 16 bytes, then why not just pad with zeros? Looking at the documentation referenced from...

12 years ago | 0

| accepted

Answered
Intensity image of two variables
Hi Sunil - it sounds like you want to create some sort of bar chart (given your labels for the x- and y-axes) but as an image. ...

12 years ago | 0

| accepted

Answered
VideoReader error 'Error using message/getString'
I took your code and was able to use it to read the first 30 frames of an avi that I have. So there doesn't appear to be anythi...

12 years ago | 0

Answered
Calling Java program from Matlab
The following link provides a good starting point on instantiating Java classes in MATLAB: <http://www.mathworks.com/help/matlab...

12 years ago | 1

| accepted

Answered
How can I return a char of object variable name from a method
The following method (once added to your above class) seems to do what I think you want: function [nm] = getMyName(~) ...

12 years ago | 0

Answered
problem in generate code using cftool
Check the signature of the *createFit* function. Does it actually return something? i.e. if the signature is just: funct...

12 years ago | 1

Answered
HOW CAN I RE-EDIT MATRIX?
First determine the dimensions of the new matrix (called *B* say) which will mx2 where *m* is the sum of the middle column. The...

12 years ago | 1

Load more