Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
Using throw error to validate string input
if any(~x) error(msg) end

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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 ...

environ 7 ans il y a | 0

| A accepté

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

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

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

environ 7 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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 ...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 2

Réponse apportée
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.

environ 7 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 4

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 0

Réponse apportée
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...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 7 ans il y a | 1

Réponse apportée
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...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
spreadsheet and Matlab 2016
If I look in the store it is a separate product, similar to a toolbox.

environ 7 ans il y a | 0

Charger plus