Respondida
How do I map the data using interp1()?
I have no clue why you would want to do this, but the code below will treat the histogram as a lookup table. You need to convert...

alrededor de 7 años hace | 0

Respondida
Using throw error to validate string input
if any(~x) error(msg) end

alrededor de 7 años hace | 0

| aceptada

Respondida
how to add to image ?
I would presume this means that you have an image where you add mean(X,'all') to the original. The loops are not needed in Matla...

alrededor de 7 años hace | 1

Respondida
x-axis value
You x-axis exponent has me believe that you already have the correct range and that your goal is to show nanoseconds instead of ...

alrededor de 7 años hace | 0

| aceptada

Respondida
how can i change the xlim in bar?
You mean like this? set(gca,'XTick',ceil(1970:2.5:2005))

alrededor de 7 años hace | 0

| aceptada

Respondida
Displaying values in static box for values in pop up menu !!
There is a difference between the Value property and the String property. Also, you're better off using switch (which will make ...

alrededor de 7 años hace | 0

| aceptada

Respondida
How can i plot this kind of figure in Matlab ?
Looks like a bar plot and a line plot combined in one axis. Don't forget hold on when making this. For the second y axis you ca...

alrededor de 7 años hace | 0

Respondida
An easy problem for you,propably
Matlab doesn't work with double conditions, so you need to use a setup like the one below if you want to keep your code structur...

alrededor de 7 años hace | 1

Respondida
decimal place rounding off
Why not use the round function? You could use floor, ceil, or fix instead, but that would be cheating a bit. Anyway, you can u...

alrededor de 7 años hace | 0

Respondida
How to add brightness slider in matlab gui that would change the second image's brightness?
You should probably be using something like this: function pushbutton1_Callback(hObject, eventdata, handles) [filename,pathnam...

alrededor de 7 años hace | 0

| aceptada

Respondida
Vectorizing a nasted loop
This should work: idx=reshape(1:(Chunks*Window),Window,Chunks); DataChunk=Raw.RAW(idx); TimeChunk=Raw.Time(idx); The output ...

alrededor de 7 años hace | 1

| aceptada

Respondida
Dimensions of matrices being concatenated are not consistent.
Your x vector is 6x1, while all other vectors are 5x1. Removing one element from that vector lets the code run without error: x...

alrededor de 7 años hace | 0

| aceptada

Respondida
How to add frame to image ?
Something like the code below should work. There are many ways to resize your image, below you'll find two examples. frame=imre...

alrededor de 7 años hace | 1

| aceptada

Respondida
How to randomly swap 2 elements in an array?
I'm going to assume at least one of the swap elements must be an number, and that the swapped numbers are allowed to have the sa...

alrededor de 7 años hace | 0

| aceptada

Respondida
Undefined function or variable
You don't define a, so it doesn't exist. But that is far from the only issue with your code. Also, why are you using j as a fun...

alrededor de 7 años hace | 1

Respondida
calculate mean using while and iteration?
So you want to calculate these values? xn(1)=mean(b(a>0.5 & a<1.5)); xn(2)=mean(b(a>1.5 & a<2.5)); xn(3)=mean(b(a>2.5 & a<3.5...

más de 7 años hace | 0

| aceptada

Respondida
Attempted to access x(2,1); index out of bounds because size(x)=[1,4].
The fsolve function requires a working function as input. Your function contains a few typos, and it assumes the input is a colu...

más de 7 años hace | 0

Respondida
How can I interpolate medians in a box plot?
You can probably extract the median value from the object boxplot creates, but you can also use the median function to find the ...

más de 7 años hace | 0

Respondida
Installing matlab 2019a 32 bit
Unfortunately, "x86-64" means '64 bit', not '32 or 64 bit'. Both your processor and OS must be 64 bit to have the 64 bit version...

más de 7 años hace | 2

| aceptada

Respondida
how can I test and display how many values in a vector are contained in a pre-determined interval
Trivial with ismember: idx=[168 190 173 147 147 110 169 57 174 122 159 174 104 132]; T=160:192; in_T=ismember(idx,T); numb...

más de 7 años hace | 1

| aceptada

Respondida
How to add distance lines between bar graphs in MATLAB?
I'm not aware of this functionality being implemented in the base Matlab. So if it is not in the FEX, you'll have to write it yo...

más de 7 años hace | 0

Respondida
how to generate random numbers with constraints?
The reason for your infinite loop is that you need an average random value of 150, which is far from the expected value of 402.5...

más de 7 años hace | 2

Respondida
User interface with GUI and callbacks working as interruption in a main function
You can use the callback of that second button to stop the continously looping timer function.

más de 7 años hace | 0

| aceptada

Respondida
Saving a montage image
There is a difference between an image and an image object. The latter is a graphics object that is shown in the axes. It does c...

más de 7 años hace | 4

| aceptada

Respondida
Replace Nan by a number in a cell array
You can use the isnan function: r = cell(sum(nL), numel(nL), numel(nW), max(nW(:))); for k = 1 : numel(nW) for m = 1 : nW...

más de 7 años hace | 0

Respondida
MATLAB command window on High DPI screens
right-click on the title bar of your command window (you can open a fresh one by using windows+R and entering cmd) go to proper...

más de 7 años hace | 1

| aceptada

Respondida
How can I get the plot for a saved figure?
The line objects are probably in the Children property of your axes, which is itself a child of the figure (but so is the legend...

más de 7 años hace | 2

| aceptada

Respondida
Determine which cells contain elements of another cell
A few calls to cellfun, a regexp and ismember will do the trick: fileNames = [{'.'}, {'..'}, {'1.bin'}, {'1_Report.txt'}, {'2.b...

más de 7 años hace | 1

Respondida
Add custom x and y axes (not relevant to the image)
The code below should help. You can specify tick labels that have nothing to do with the ticks themselves. %start out with a cl...

más de 7 años hace | 0

| aceptada

Respondida
spreadsheet and Matlab 2016
If I look in the store it is a separate product, similar to a toolbox.

más de 7 años hace | 0

Cargar más