Risposto
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...

oltre 7 anni fa | 1

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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,...

oltre 7 anni fa | 0

| accettato

Risposto
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. ...

oltre 7 anni fa | 0

| accettato

Risposto
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 ...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 1

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
'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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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...

oltre 7 anni fa | 0

Risposto
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...

oltre 7 anni fa | 1

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 1

| accettato

Risposto
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...

oltre 7 anni fa | 0

| accettato

Risposto
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...

oltre 7 anni fa | 4

| accettato

Carica altro