Answered
Saving Segmentation Result automatically - sprintf variable name
baseFileName = sprintf('data (%d).%d.png', z, y); seems like it should work.

10 years ago | 0

Answered
How to create a new file in MATLAB?
fid = fopen( 'someNameYouChoose.atp', 'w' ) To put together the filename from components e.g. filename = ['file', num2...

10 years ago | 0

Answered
How to resolve gonzales script 'houghpeakes.m' index out bound?
'threshold',ceil(0.3*max(H(:))) are not sensible arguments for the code you posted. They may be for the Matlab builtin, bu...

10 years ago | 0

| accepted

Answered
Logical Indexing Data Issue
myMatrix = randi( 10, 1000, 3 ); condition = myMatrix( :, 1 ) == 5 & myMatrix( :, 2 ) == 4; result = myMatrix(...

10 years ago | 0

Answered
how can i write a function?
function someFunction( X1, X2 ) validateattributes( X2, { 'double', 'single' }, { '>=', pi/6, '<=', pi/3 } ) ......

10 years ago | 0

Answered
how to get image from axes in other function?
In Naujas, change the first few lines to: function Naujas( img ) % imshow(img); i.e. pass the image in as an argu...

10 years ago | 0

| accepted

Answered
if my computer has windows 32bits...
R2015b is the last version of Matlab that includes a 32-bit version.

10 years ago | 0

Answered
GUI - Plotting graph iteratively
I can't see in amongst your code exactly where this needs to fit as I have limited time, but here is a quick example of doing so...

10 years ago | 0

Answered
how to writetable to specifc folder
You have to give your file a name. You do: my_directory = 'D:\PPL Server Programme\_Last Version 20150526\MATLAB\Pulsdurat...

10 years ago | 1

Answered
Change multiple exponent on x-axis.
If you are using R2015b or later take a look at: hAxes.XAxis; where hAxes would be your axes handle (e.g. hAxes = gca), ...

10 years ago | 1

| accepted

Answered
How do I replace a specific value in vector after its been through a loop?
c = A; will create an array c of length equal to A. You don't then want to use for i = 1:c as a for loop conditi...

10 years ago | 0

Answered
Reading data files within a subfolder of the search path?
There is no requirement for data to be on the Matlab path. How you access the data is up to you, but if it is not on the Matlab...

10 years ago | 0

Answered
Is it possible to transform a string to a variable code name in MATLAB?
You are correct that this is something you will be strongly advised against even trying to do. Someone will probably post a rel...

10 years ago | 1

Answered
Reference to non-existing field
Try this instead: xlswrite(filename,RefData.tasks.HTS.EntireCycle.angles.rawData.( ['Cycle' num2str(i)] ).LElbowProSupinati...

10 years ago | 0

Answered
Indexation of the matrix
That looks an odd piece of code. >> eye(3) == 0 ans = 0 1 1 1 0 1 1 1 0 ...

10 years ago | 2

Answered
understanding contents and size of structures
3x1 and 1x3 mean the same for structs as they do for numeric or cell arrays - i.e. you have an array of structs. e.g. s(1)....

10 years ago | 1

Answered
How to calculate max,min,average values from a cell array?
min_pause_time = cellfun( @min, s2.pause_duration); max_pause_time = cellfun( @max, s2.pause_duration ); average_pause_t...

10 years ago | 0

Answered
comparing 2 vectors for duplicates
[L,I] = ismember(A,B); vals = A(I~=0); should work. The extra 'find' step is un-necessary if you use the second output ...

10 years ago | 0

| accepted

Answered
GUI - Real-Time updates displayed in listbox
Why can you not just do what you did for the other listbox? i.e. collect your outputs into a cell array and set it as the listb...

10 years ago | 0

Answered
How to reduce size of arrays inside of a loop?
doc sparse should reduce the memory usage if you have a sufficient proportion of zeros. I don't really use it myself so I ...

10 years ago | 0

Answered
Store and Retrieve simple text box content using GUI
doc containers.map should help with this if your IDs are not guaranteed to be contiguous and starting from 1. There are ex...

10 years ago | 1

| accepted

Answered
Need help with solving a problem
x = 0:pi/12:2*pi; y = zeros( size( x ) ); case1 = x >= 0 & x < pi/2; y( case1 ) = 6*(2 * x( case1 )-.5*sin( x( ca...

10 years ago | 0

Answered
Problem getting array after multiplication/division
Hp = K * (1 + (f./f1))./(1 + (f./f2)); You are missing the . in yours when dividing your two terms.

10 years ago | 1

| accepted

Answered
Plotting a grid of points with inpolygon check
Replacing [X,Y] = meshgrid(-99.45:0.1:-95.65,33.65:0.1:37.55); with [X,Y] = meshgrid(-99.45:0.1:-95.65,37.55:-0.1:3...

10 years ago | 0

| accepted

Answered
How to input a 294192x294192 array?
Why do you want an array that big? Clearly its size is way bigger than is sensible so even if you could create it what would yo...

10 years ago | 1

| accepted

Answered
What does a colon followed by comma do to an image?
im1(:,:,i) means take all elements of your 3d array in the first and 2nd dimensions and only the i'th value in the 3rd dime...

10 years ago | 0

| accepted

Answered
Draw a draggble rectangle (fill with color) on a subplot to change the values in another subplot.
If you have the Image Processing toolbox doc imrect

10 years ago | 0

Answered
Can't convert Primitive image type to unit 8
I don't know anything about what PeopleDetector is or where it comes from. Is it in a Mathworks toolbox? If so it would be use...

10 years ago | 0

Answered
Can I get randsample() to output zero?
bias = 2; AD = randsample(101,1,1,[1 linspace(1,bias,100)]) - 1; would seem to achieve that though it depends what kind of ...

10 years ago | 0

| accepted

Answered
problem with togglebutton callback
function togglebutton1_Callback(hObject, eventdata, handles) ispushed=get(hObject,'Value'); if ispushed set(hObj...

10 years ago | 0

Load more