Answered
Shifting pixel colums in an image
shifted = zeros(size(original)); shifted(:, 130:280,:) = original(:,100:250,:);

9 years ago | 2

| accepted

Answered
How to have multiple scatter plots on one graph?
Isn't this what you actually want? x = 1:7; y = rand(7,7); bar(x,y)

9 years ago | 2

| accepted

Answered
save matrices of the sequential names in cell array
Why not just use cell arrays? for i =1:5 A{i} = i*ones(2*i,2*i); C{i} = A{i}; end But if you insist on using eval...

9 years ago | 0

Answered
Output to an Array
You're indexing like this: for x = 1:20:2001 g(x) = blah; end You should be indexing like this: for i = 1:1:100 ...

9 years ago | 0

Question


Programs communicating with Matlab
I am trying to find out as much as I can about using external programs to initiate matlab commands in compiled matlab exes. ...

9 years ago | 2 answers | 0

2

answers

Answered
Attempted to access y(15); index must be a positive integer or logical.
Its a floating point error down at the 15th significant figure. If you simply round "i", it'll work.

9 years ago | 0

Answered
Reading a text file into a function as variables
dlmread That's a function that is designed to read delimited files into matlab. - It'll likely give you an array with all th...

9 years ago | 0

Answered
How to modify parameters in a compile GUI by loading a file?
Don't use an "m" file for settings. You need to use, for example, a fixed format text file, or a fixed format excel file, or a b...

9 years ago | 0

Answered
GUIDE opens figure as "Untitled"
You probably changed a filename when you should have used the GUIDE - "SAVE AS" menu option to change it. Rename the files b...

9 years ago | 0

| accepted

Answered
loop and graph problem (time vs area)
problem 1: Looks like your dir call should be "dir([path '*.jpg']) problem 2: Looks like area = bwarea(temp4); should be area...

9 years ago | 0

| accepted

Answered
for loop for matlab files
Ugh. The curse of eval strikes again. That'll run them in a loop, but god help anyone trying to debug it. for i = 1:m ...

9 years ago | 0

Answered
How do i sent a document to printer.
I can't see any immediately obvious way of achieving what you want. Sadly. I can however see that there may be three solution...

9 years ago | 0

Answered
Eliminating a FOR loop
The function you might be looking for is probably intersect

9 years ago | 0

Answered
How to do the iterative work?
Pretty much yeah, matrix(i,i,1) = 5 That will set the element on the ith row and ith column on the 1st slice/page/"whate...

9 years ago | 0

Answered
I get an error, could you guys help me to figure out?
The error is that something is using too much memory. If your images are huge, this is a possible result. You have a few way...

9 years ago | 0

Answered
how to process many sequential data using for loop
Ugh. Don't name variables like that, its a bad idea. But, the function you need is "eval" current_trial = eval(['trial' num2...

9 years ago | 0

| accepted

Answered
Plotting a a constant line in a graph
plot(X,ones(size(X)) * k)

9 years ago | 7

| accepted

Answered
Converting "twos complement" - decimal to actual twos complement and back to decimal
Ah. Try: typecast(uint32(4294721774),'int32') I'm sure someone mentioned a faster version was in file exchange somewher...

9 years ago | 1

| accepted

Answered
Converting "twos complement" - decimal to actual twos complement and back to decimal
Sounds like you just want to read the value as a signed 32 bit integer.... integer_with_32_bits = int32(4294721774)

9 years ago | 0

Answered
sin cos problem. How to solve it
Theres 2 things that could be wrong. 1. User error - You're actually putting in something like: (-90 + 18) and (-90 + 45), i...

9 years ago | 0

| accepted

Answered
Store out put as a text
ans{1}

9 years ago | 0

| accepted

Answered
what can I do to prevent overwriting in for loop?
z(i) = mean(x(i:i+59,:));

9 years ago | 0

Answered
How do i replace this code to fast up?
Ok, now I see why it takes so long. You're repeating that calculation 30,000 times. But seeing what you're doing, this might ...

9 years ago | 1

| accepted

Answered
Search an element in another matrix.
[c ia ib] = intersect(A(:,1),B(:,1)); c should be 217 x 1, as should ia & ib. A(ia,:) that should spit out the date...

9 years ago | 0

| accepted

Answered
Replace values in a matrix with ones from other matrix based on some criteria
A(isnan(A)) = B(isnan(A));

9 years ago | 2

Answered
Probability of two adjacent cells being below gaussian percentile
Doing it properly can be tricky. For one "bad" elements - you have an average of 8% - it has 8 neighbours (actually, on av...

9 years ago | 0

Answered
How to make a kind of memory in simulink?
There are "memory" and integrator blocks built into simulink....

9 years ago | 1

Answered
How to write xls comment nodes (red corners) from Matlab ?
There is a solution. Its called "write your own function". Step 1: If you open up the code for xlswrite, you'll be able to se...

9 years ago | 0

Answered
what's the difference in single and float when reading data with fread function.
fread has a habit of reading the correct data type, but returning it as a double. float and single should be identical.

9 years ago | 1

| accepted

Answered
Help with GUI - Push button
This should be what you need: value1 = get(num1,'String') folder = uigetdir(); dlmwrite - though you might go for a...

9 years ago | 0

Load more