Question


How to do an unusual convolution...
So, I have three things which I need to convolve together. 1. - A list of times of occurrences and amplitude of a signal. Eac...

11 years ago | 2 answers | 0

2

answers

Answered
how to plot a 2D graph on top of a 3D surf
I can't see the link, but if you have a surf, you can simply issue the commands: hold on plot3(x,y,z,colour) To plot a...

11 years ago | 0

Answered
Write End Of File (EOF)
If by EOF you mean the ascii code "4", all you need to do is fwrite(fid,4,'uint8'); on the open file. You can do the same wi...

11 years ago | 0

Answered
Reading/Finding data withing column
constants(find( (constants(:,1) == 1st) & (constants(:,2) == 2nd) & (constants(:,3) == 3rd)),4) This: 1. Compares each o...

11 years ago | 0

Answered
Selecting all pixels except one pixel
You need to use linear or logical indexing to do that. In this case, linear would be easier: The indices for a 3x3 are: [1...

11 years ago | 1

| accepted

Answered
what does this error mean?
You will get that error if you set up a variable eg: x = []; and then try to access it using "dots", or getfield eg.: x...

11 years ago | 1

Answered
How can I take a group of picture files and divide each picture into bins?
If you have all of your frames within a single matrix: eg. if you have: colour(x,y,rgb,frame) mean_of_each_frame = mean(me...

11 years ago | 0

Answered
Multiple figure in same subplot on figure
I think you would do better by using more subplots: subplot(2,2,1) etc. If you just want two images next to each other, and i...

11 years ago | 0

| accepted

Answered
how to combine more than 2 matrics
That error comes up whenever you try to combine vectors of incorrect sizes. You claim to have 6 vectors to combine, but your ...

11 years ago | 0

Answered
detecting Excel files without Excel extension
You can try something like fid = fopen(filename,'r'); fifty_bytes = fread(fid,50,'uint8'); fclose(fid); Valid_characte...

11 years ago | 0

| accepted

Answered
Generating random numbers within a range determined by elements in another array
Array = [3 7; 1 3; 44 66]; Choose your row, "i" NewRandom = roundingfunctionofchoice(rand(size(i)).*(Array(i,2)-Array(...

11 years ago | 1

| accepted

Answered
impossible to accede to a file with fopen
Do not use fopen then try to use dlmwrite/csvwrite/etc.

11 years ago | 1

Answered
how to change this matrix in this manner?
H = [reshape(reshape(A(:,1:2),[],2)',[],1);reshape(reshape(A(:,3:4),[],2)',[],1)];

11 years ago | 0

| accepted

Answered
Find the maxima in a graph
[m K] = max(Variable(:)) tells you the maximum value anywhere in Variable (m), and it's index (K).

11 years ago | 0

Answered
Concatenate more than 2 mat files?
You need to load your mat files into variables. File1 = load('filename.mat'); File1 then contains the contents of filename. Y...

11 years ago | 0

Answered
Two functions in the same file causing error: "Maximum recursion limit of 500 reached"
The simplest answer is to set: y = 2 * abs(x); If you do that, you don't need to recursively call the function.

11 years ago | 0

Answered
How can I do a simple matrix multiplication withour running in any out of memory error
Do it the old fashioned way using loops. - It means you do NOT need to have both A, its transpose and the result in memory, but ...

11 years ago | 0

Answered
'double' input argument not found using a function
findpeaks only operates on numbers that are 64 bit floating point numbers (they're called doubles). Convert your 16bit intege...

11 years ago | 0

| accepted

Answered
While using save command, I wanna choose directory which files can be saved into it.
You need to provide save with the path. eg. save('C:\here.txt','p','p','-ASCII'); Or you can save to where you're working ...

11 years ago | 0

| accepted

Answered
Update a variable within a function and recalculate
once you invert x, add the line... y = fun(x);

11 years ago | 0

| accepted

Answered
Perfect random numbers - How can I refine an initial dataset from randn to be perfrectly normal?
It isn't possible. Just looking at the mean & std, if you do manage to get the mean to be exactly 0 and the std to be exactly...

11 years ago | 1

Answered
Maximum decimal and binary values
The maximum integer value matlab can innately handle is 2^64 - 1 (uint64) (approx 8*10^18) The maximum _number_ matlab can ha...

11 years ago | 0

Answered
fopen gives negative fid in GUI
Your filename is wrong. You need to have the _full path and filename_ for fopen to work. [myfolderPV '\' PVFiles(k).name]...

11 years ago | 1

| accepted

Answered
accessing data in multiple pixels (x,y) in 3D matrix (t,x,y)
Matrix_2D = reshape(Matrix_3D,[timesamples numberofpixels]); Determine the pixel numbers you want (1 = top left, 2 = 1 below ...

11 years ago | 1

| accepted

Answered
Pre allocate memory for unknown variable size
Preallocate to the largest size you will ever need, and for the unused elements, you can set them to a known bad value. eg. NaN,...

11 years ago | 0

| accepted

Answered
for loop problem with matrix
You could do it by using the THIRD dimension. xx = reshape(Input,[4,nl/4,10]); x_r = [xx(1,:,:);-xx(3,:,:)]; x_l = [x...

11 years ago | 0

| accepted

Answered
How can I minimise the memory usage of the cat function
Why not just create C to start with? C = rand(10000,10000,2); ? NB, C requires 1.4Gb of RAM. I suggest you avoid such big...

11 years ago | 0

Answered
How to create a callback from a function which changes a value in another function?
Add: ImageProperties(fov,Plot) to your slider callback... obviously you'll need to supply fov and Plot.

11 years ago | 0

| accepted

Answered
Organize Data Using Cell Array of Time stamps?
index = find(strcmpi(desired_date,time_stamps));

11 years ago | 0

Answered
Float to binary string and vice-versa
typecast will convert a 32bit float to a single 32bit integer, or into 4 8 bit integers, or 4 characters. (And vice versa). 3...

11 years ago | 2

| accepted

Load more