Risposto
How to get my graph to fit the data?
You can use the function |axis| to set the boundaries of your plot. You can also process axes separately with |xlim|, |ylim| and...

circa 9 anni fa | 0

| accettato

Risposto
cleaning duplicate data unique matlab2013
I've seen a more efficient piece of code that can do this somewhere on this forum somewhere in past month or so, but I'm too laz...

circa 9 anni fa | 0

| accettato

Risposto
Help with word segmentation
A quick and dirty method that may not always work is this: IM=imread('li.jpg'); IM=IM(321:472,97:1106,:);%crop white fie...

circa 9 anni fa | 1

| accettato

Risposto
How to assign a unique variable to each output in a for loop?
Some people have very strong opinions on this topic. You should NOT dynamically create variable names. It makes for unreadable, ...

circa 9 anni fa | 0

| accettato

Risposto
instead of creating a variable every time is there a way to store automatically the data selected by a brush on a figure ?
I had a look at the object properties (using |get(gcf,'Children')| ) to see if the brush appeared as an object, but it did not (...

circa 9 anni fa | 0

| accettato

Risposto
Plot a sine wave with the following... how to plot it?
You're very close: freq=1000;%1 kHz t=linspace(0,5,1024)/freq;%from 0 to 5 periods in 1024 steps A=2;%amplitude x=...

circa 9 anni fa | 1

| accettato

Risposto
Select dicom image and save it
You put in the argument as string (with quotes), so Matlab tried to open a file with the exact name |filename|. Just remove the ...

circa 9 anni fa | 0

| accettato

Risposto
Is there a way to have a field of a struct pop up as a plot when I click on the data?
You could look into GUIDE, but I suspect you will find that it is easier to just hand-code the selection: n_select=1; se...

circa 9 anni fa | 0

Risposto
sprintf/fprintf help
You should have a look at the documentation. Just type |doc sprintf| and it will open. |fprintf| writes (prints) a formatted ...

circa 9 anni fa | 0

Risposto
how can i solve equation with summation
I think I can read the summation index: it is an i. That would mean that you should initiate i as a sym not as a hard-coded valu...

circa 9 anni fa | 2

| accettato

Risposto
Save a figure as .bmp or .png WITHOUT background
If you have the image as a binary matrix, you can use |imsave| to save it to file. If you do not, you can load your current r...

circa 9 anni fa | 1

Risposto
Why this function is wrong written
The error explains exactly what is wrong: "Error using * Inner matrix dimensions must agree." You forgot the dot for element...

circa 9 anni fa | 0

Risposto
Why is my for loop outputting empty matrices?
You are adding 1 to i, because Matlab has no way of knowing that you mean the next value. In the find command, you should rea...

circa 9 anni fa | 0

| accettato

Risposto
How can i get the mat2cell command to loop itself and write its outcome in different rows?
You should pre-allocate DataSheet and not overwrite it on every loop. DataSheet=cell(n,KeyA); for k = 1:n str = Bt...

circa 9 anni fa | 1

| accettato

Risposto
Understanding repmat(6,,(1:n*N),1)
Have you even considered looking at the documentation? It really helps answering your question. Looking at the documentation,...

circa 9 anni fa | 2

| accettato

Risposto
Hi can anyone please let me know, how can i generate s-parameters for a transfer function in MATLAB..Thanks in advance
As Star Strider mentioned, have a look at the documentation. It really helps a lot. As for your question itself, the answer is (...

circa 9 anni fa | 0

Risposto
pick only the first element of elements within range
list=[152.500000000000;166.500000000000;169;172.500000000000;174;179;184.500000000000;... 188;189.500000000000;191.5000...

circa 9 anni fa | 0

| accettato

Risposto
Number of pixels inside a pixel circle help!!!
I you find out the center and radius of the circle you drew, you can use |meshgrid| to find the distance of each pixel to the ce...

circa 9 anni fa | 0

Domanda


Past 30 days downloads on the FEX incorrect
I know it is not strictly a Matlab question, but I think it fits best on this forum. I noticed that for some submissions on t...

circa 9 anni fa | 2 risposte | 0

2

risposte

Risposto
Function handle as function input?
Inside such a wrapper, I highly doubt that. But in principle it should be possible to do what you want. I haven't tested this co...

circa 9 anni fa | 0

| accettato

Risposto
Counting repeating element in array
If they are all going to be greater or equal to one integer values, you can use them as the indices of a vector. function [...

circa 9 anni fa | 0

Risposto
The function move_me is defined like this: function w = move_me(v,a). The first input argument v is a row-vector, while a is a scalar. The function moves every element of v that is equal to a to the end of the vector.
function w=move_me(v,a) if ~exist('a','var'),a=0;end w=[v(v~=a) v(v==a)]; end If this is homework, try to think of...

circa 9 anni fa | 0

| accettato

Risposto
How to find repeated values in a matrix?
Are repeated values always next to each other? If so you can use |diff(Q,1,2)| to find the positions that have repeated values. ...

circa 9 anni fa | 0

| accettato

Risposto
Space between the ticks or the ticklabels
You can cheat: use regularly spaced x-values for the plotting, but then change the tick labels to your serial numbers. (Of cours...

circa 9 anni fa | 1

Risposto
Montage of two Images
Montage is rather picky about the image format. It wants the following input format: (rows,columns,colors,pages). What you tried...

circa 9 anni fa | 1

Risposto
How to plot a graph in matalab2016?
In general you should copy the entire error stack (all the red text). This makes it easier for others to understand what went wr...

circa 9 anni fa | 0

Risposto
Writing a basic formula - need assisstance
You may be able to play around with functions like |cumsum|, but I'm afraid you will have to use a loop: Var1=rand(4000,1);...

circa 9 anni fa | 0

Risposto
How to read empty row of an excel sheet with a matlab command?
From the documentation (type |doc xlswrite|): |xlswrite(filename,A,xlRange)| writes to the rectangular region specified by |x...

circa 9 anni fa | 0

Risposto
How to perform data filtering in matlab like in excel
Logical indexing is your friend: data=days(days==4 && (class==5 || class==6));

circa 9 anni fa | 0

| accettato

Risposto
How to start my plot from the beginning of the x-axis?
You can use the |xlim| function (or on older releases the |axis| function) to do this. But as |xlim| only accepts numerical inpu...

circa 9 anni fa | 1

Carica altro