Réponse apportée
Compare two or more cell arrays with a specific tolerence?
The code below will iterate through the cell levels. The resulting output is only true if all dimensions are equal and all eleme...

plus de 7 ans il y a | 1

Réponse apportée
Replacing pixel value in a loop
There are multiple issues with your code. The code analyzer already picks up 6 warnings, wich might hide a warning you shouldn't...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Slider Code problem with axes
Instead of scaling the data, this code changes the axis limits. %generate some data and set the x window size x=linspace(0,50,...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Surf coloring question: How CData works?
This is where the caxis function is for. You can change the color axis to match your data to a desired part of your color bar. ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
sub2ind out of range error
Because you generate y to be size of a (if the size is odd), you can't add 1 to it, because then it will be out of range. a=[1 ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Create a .run file with 1000 sequenced commands
A better solution is to fopen your file before your loop, so it is wiped before your first iteration. You should also use the sp...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How use keyboard arrow keys to control the slider GUI in App Designer?
You can use this tester GUI to determine what you should put for the special keys. Don't forget the otherwise option to exit the...

plus de 7 ans il y a | 0

Réponse apportée
How to remove numbers between specific symbols in text array?
You can use regular expressions for this task: str1='Gas_1_O2'; str2='Flow_Fluidization'; regexprep(str1,'_[0-9]*_','_') reg...

plus de 7 ans il y a | 0

Réponse apportée
Use older MATLAB save formats
Since v7.3 is R2006b, I don't really see a reason why you would need to set the default to -v7. Also, why don't you write a wra...

plus de 7 ans il y a | 0

Réponse apportée
Plotting elements of a matrix in one vertical line for every iteration
As I mentioned in my comment, you need to find a way to convert a position in your matrix to a color. In my example below I'm us...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Imwrite JPG with comments
For my FEX submission PhotoAnnotation I bypass the built-in tools in favor of exiftool. URL=['http://web.archive.org/web/201708...

plus de 7 ans il y a | 1

Réponse apportée
How do i create lots of gaussian channel?
There are many ways to do something like this. You can either fill your array by using cellfun, or a loop, or a direct calculati...

plus de 7 ans il y a | 0

Réponse apportée
Kernel density estimation plot with median and quartiles
I don't have the statistics toolbox, so I needed to generate some random data myself, but the code below should do what you need...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can I get a plot like this on Matlab?
You can do something like this: %set some mu,height,sd pairs %(replace with your actual data) mu_list=[1200 1350 1500 1550 16...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Use annotation function changing the string dinamycally
Create the annotation once, and then only change the string property inside the loop. figure(1) txt=''; h_annot=annotation('t...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How do I convert a grid 'surface' variable to distinct X, Y and Z variables?
If you restructure your data you can use tools like find, ismember, and ismembertol. That way you can use logical indexing to se...

plus de 7 ans il y a | 0

Réponse apportée
GUI varargout does not update
Instead of using the slow disk to save and store data, you could use setappdata instead. Since you wish to close the figure, you...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
'std::exception' when calling python function to open GUI from MATLAB
I haven't used python from Matlab myself, but Tkinter is mentioned in this doc page, which seems to suggest it isn't supported a...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to loop over this lines?
You mean like this? SW_NRS = nan(11,8,960); for k=1:(size(SW_NRS,3)/24) SW = SWGNTWTR{1,k}(NRS_lat,NRS_lon,1:24); S...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to change text on a panel?
You can use the handle: %create text field a='0'; h_txt=uicontrol(handles.vehicleData, 'Style','text','Position', [148 -12 87...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
I'm not sure what I'm doing wrong that gives me a error
You should transpose your speed vector, so it has one value per row. If you then change your expression to the one below, the im...

plus de 7 ans il y a | 0

Réponse apportée
plot too many lines
You should not use clear on its own. If you want to, you can use clear variables As to your actual problem, is your xd not so...

plus de 7 ans il y a | 0

Réponse apportée
How to read image from axes?
That is not how it works. What you can do instead is using ind2rgb to convert your gray scale image (which you got with rgb2gray...

plus de 7 ans il y a | 0

Réponse apportée
Is there a way to configure the %d in fprintf function to use exponential notation when writing to a text file?
It looks like this might have something to do with flintmax, which would mean there would be no way to change this. This value i...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Handle and hobject in Matlab GUI
You should not be using GUIDE in the first place. The first input to a callback function is a handle to the callback object, wh...

plus de 7 ans il y a | 0

Réponse apportée
Sending two tones (Right and Left)
See this answer. fs= 8000; %frequency sample rate i=1/fs; t=0:i:10; %time axis a=10; % amplitude %Left Signal with F=44...

plus de 7 ans il y a | 1

Réponse apportée
meshgrid values to function without loop
If you are not prepared to change the function to accept non-scalar inputs, you can use this code to implicitly use for-loops. T...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
how to creat this vector?
I'm going to guess you mean this instead, and wanted to create Y from X accordingly. X=[1 1 0 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
In my gui3 , i want to break loop when i close the gui figure window
You can write a small function that tests if the object still exists. Unfortunately, exist and isobject don't solve this for you...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Using omitnan in accumarray
You can either write a wrapper function, or extend the anonymous function: accumarray(x,y,[N'1],@(x)mean(x,'omitnan')) or acc...

plus de 7 ans il y a | 4

| A accepté

Charger plus