Question


Handling odd-sized integers
I have a horrible binary file format, which does have a defined format, and which can contain several odd types of data. I h...

11 years ago | 0 answers | 0

0

answers

Answered
Seeking help creating a double matrix of ones and minus ones
startpoint = eye(desired_size); positives = cumsum(startpoint) whole_thing = [positives -positives]

11 years ago | 0

| accepted

Answered
how can i summarize 2 different signals?
Signal A: 10,000 samples, sampled at 20KHz Signal B: 5,000 samples, sampled at 20KHz A(samples_offset+(1:5000)) = A(sampl...

11 years ago | 0

Answered
Local to global co-ordinate system
So you have a body travelling in a circle, which is fixed at coordinates (0,0) in body axes, and you want to translate those co-...

11 years ago | 0

| accepted

Answered
can you give me the basic simple code for this figure?
Are you working in simulink, or matlab? r = [zeros(1,number_of_delays-1) value1 value2 value3 .... ]; for k = number_of_...

11 years ago | 0

Answered
How we can plot time Vs data, with 10mins interval? Time is12hrs only i.e. starting from 7AM to 7PM on x-axis.
figure axishandle = gca; plot(datenums_of_relevant_times,data) set(axishandle,'XTickLabels',datestr(get(axishandle,'XTic...

11 years ago | 0

Answered
Subscripted assignment dimension mismatch.
The error is due to the fact that the RebonatoFormula function does not always output scalar values. You need to determine e...

11 years ago | 0

Answered
indexing error for loop: "In an assignment A(I) = B, the number of elements in B and I must be the same."
The issue is that you're trying to put a matrix into the space that a scalar would take. Try: New_Bi(i,:) = A(index(i),:);

11 years ago | 0

| accepted

Answered
is there any robust solution to Out of memory error in Windows 7 32 bit machine where MCR is installed?
All you can really do is get your program to log the memory stats to give you a hint of when/why it falls over. - It may be that...

11 years ago | 0

Answered
Problem with Empty matrix: 1-by-0
Before the if statement, add disp(~isempty(leftoverROI1s{1})) disp(~isempty(missinglabelsinimage{1})) If both turn up ...

11 years ago | 0

Answered
Find maximum number of consecutive negative values
logi = x < 0; [bw n] = bwlabel(logi); A = regionprops(bw,'Area'); Answer = max([A(:).Area]);

11 years ago | 0

Question


Unused values in enumeration classes
I have a large set of enumeration classes. I have been told the definition for one such class (mode) as: Init (34) Operati...

11 years ago | 0 answers | 0

0

answers

Answered
How can I create a plot where the graph shifts as the data extends?
a = plot(((data.time(1)-datenum(2013,01,00)),data.P(1)); for i = 1:21598 set(a,'Xdata',data.time(i)-datenum(2013,01,00))...

11 years ago | 0

Answered
How do I select random vectors from a set of vectors?
To get a random order: random_numbers = rand(number_of_vectors,1); [sorted_numbers random_order] = sort(random_numbers); ...

11 years ago | 0

Answered
How do I convert strings in a dataset to numbers?
Its a cheat, but provided your csv file has less than 256 columns and 65536 rows, you can import the whole lot with "xlsread" ...

11 years ago | 0

Answered
Counting Voxels in a Binary Mask
if white is true: count_of_white_voxels = sum(mask(:)) ;

11 years ago | 0

| accepted

Answered
Problem including tolerance and finding value of a certain term
tol = 0.001; x = 5; n = -1; current_term = inf; while abs(current_term) > tol n = n + 1; current_term = ((-1) ^ ...

11 years ago | 0

Answered
Code formatting in the forum
Why not have two textboxes, one for text, and one for code?

11 years ago | 1

Answered
Help with Multiple Loops
I'm not entirely clear on what you're trying to do, but, I reckon you're after: MWL = reshape(MxWtLvl,117,[])'; MWL =...

11 years ago | 0

Answered
Problem with a matlab question
Its hard to give you help without giving you the answer to this one. Option 1. Recursively call the script. S = func(x,...

11 years ago | 0

Answered
Help me avoid this error: Empty matrix: 0-by-1
Change : d(i) = prod(f); to if isempty(f) d(i) = NaN; else d(i) = prod(f); end and e = sum(d) to: e ...

11 years ago | 0

| accepted

Answered
save into csv file
try xlswrite, or csvwrite instead. Either that or change the format of your cell array back into a numerical array...

11 years ago | 0

Answered
How to customize the answer of Matlab in advance?
Its hard to see what you're trying to achieve, but this MIGHT be what you want to know > data = [a b c d e]; > order_I_wan...

11 years ago | 0

Answered
How can I run an automated script for command prompt in Matlab?
If you mean "DOS" prompt, then why not create a batch file (*.bat), and fill it with the commands you need, and then issue the s...

11 years ago | 0

| accepted

Answered
create arrays in a loop
This is how to do it: for i = 1:10 eval(['variable_' num2str(i) ' = zeros(5);']); end Azzi is correct, it is usually...

11 years ago | 0

Answered
how can i add noise to the image??
my_noisy_image = cast(randn(size(my_image))*sigma,class(my_image)) + my_image;

11 years ago | 0

Answered
3D -3D rigid body image registration
If you can read in STL files, in matlab, and access all of the co-ordinates/angles to change it using axes transformations, then...

11 years ago | 0

Answered
How to develop a Euler Method (Aerospace) script
A script is just a text file (with the extension "m", containing lines of matlab code. numbers = xlsread('D:\mydatahere\fli...

11 years ago | 0

Answered
how to change the value of Neighbour pixels
map = false(size(image_to_mod)); map(down,along) = true; dmap = imdilate(map,true(3,3)); change = xor(map,dmap); image_...

11 years ago | 0

| accepted

Answered
how to put this conversion in for loop?
a = dir('d:\mytimsarehere\*.tim'); for i = 1:numel(a) filename_in = ['d:\mytimsarehere\' a(i).name]; filename_out = [fi...

11 years ago | 1

| accepted

Load more