Answered
Matlab Doesn't Recognize Fits Files (evalin, sprintf)?
You forgot to put the image name into quotation marks to mark them as strings; note that you have to use two because they appear...

10 years ago | 1

| accepted

Answered
Help with fitting linear equation
help robustfit the final exampel contains also a standard linear regression using "regress".

10 years ago | 1

Answered
Checking to see if a character is in a string array, then deleting entries where this character isn't in a string
To delete all entries with an 'a' from your dictionary dictionary = {'a' 'b' 'ba' 'c' 'hallo'}; idx = ~cellfun(@isempty, s...

10 years ago | 0

| accepted

Answered
i am working with huge data (1800000x39 mtrix) in MATLAB. I have to extract a block of matrix from certain interval out of the this large matrix. How can i concatenate the matrix from each iteration.
First generate an index of all the rows you need, an then use this index to get the small matrix m: idx = cell2mat(arrayfun...

10 years ago | 0

Answered
How to do: Multiple Row Allocation within a for loop for a Variable in GF (2^m)
I would guess that the following works B{i} = [x0, y0];

10 years ago | 0

| accepted

Answered
I want to read an image from folder in away that every time i run my code i could choose another image ?
Suppose you have jpg images in the current folder. First you read a description of the files d = dir('*.jpg'); Now each t...

10 years ago | 1

Answered
Is there Auto image cutting function???
To crop a 2D image I: M = (I==I(1,1)); Ic = I(~all(M,2), ~all(M)); This would also remove a black horizontal line that ...

10 years ago | 0

Answered
I need help with defining while loops?
Do you want to put the digits of a "a" and "b" into the elements of a matrix? The you can use this code: M = num2str([a; b])...

10 years ago | 0

Answered
Matrix help please?
You need another loop for col = 1:cols nested within the "for row" loop.

10 years ago | 0

Answered
How can increase the size of a plot with multiple plots
You can use subtightplot <http://www.mathworks.com/matlabcentral/fileexchange/39664-subtightplot>

10 years ago | 0

| accepted

Answered
delete words from list based on logical statement
Another way would be to use strvcat List = {'abatable';'abate';'abatement';'abater';'dog';'cat'; ... 'make';'aba...

10 years ago | 0

Answered
Combine columns from different matrix
Or simply reshape out = reshape(vertcat(A,B,C), 3, [])

10 years ago | 1

Answered
Hey guys! I need to find the low points
dh = diff([realmax h realmax]) > 0; h(~dh(1:end-1) & dh(2:end))

10 years ago | 0

Answered
exiting code if condition is met
if length(dict)=1 newguess=dict else %bunch of code end

10 years ago | 0

| accepted

Answered
How to make a random vector in Matlab as a ones and zeros but under control?
r = zeros(1,256); r(randperm(256, 90)) = 1;

10 years ago | 0

| accepted

Answered
Annotate multipl plots with text
Well, you are aware of the x and y pos, because you can plot the line. You can do the following x = 1:10+randi(10); y = [r...

10 years ago | 0

| accepted

Answered
error using open line 102
Probably the file you like to open is not in your path, or you do not have the permission to open the file.

10 years ago | 0

Answered
using For loop to represent positive intergers with the corresponding #. And modifying the script to write out a triangular pattern with a decreasing number of #'s on each successive line
Use input to get number, and repmat to replicate '#' number times. To count down, use for i=num:-1:1 To display num #'s...

10 years ago | 0

Answered
How to go one line before in a while loop ?
Store the line before and use it if needed: tline = []; while ~feof(fileID) linebefor...

10 years ago | 0

Answered
Divide a vector size into indivisible numbers
Avg=mean(reshape(A(1:770),10,[])) or more general Avg=mean(reshape(A(1:floor(numel(A)/10)*10),10,[]))

10 years ago | 0

| accepted

Answered
last letter in a string
x = 'ear'; lastletter = x(end);

10 years ago | 1

| accepted

Answered
Hi,I don't understand why this is not right,I am a completely new learner!
plot3 assumes three arguments. Use plot instead plot(x, V0)

10 years ago | 0

| accepted

Answered
How to make 4 different colour on four different quadrant?
Use atan2 to get the four-quadrant inverse tangent.

10 years ago | 0

Answered
input a 1*3 vector
Use brackets when entering the input >> x=input('your guess') your guess[1 2 3] x = 1 2 3

10 years ago | 0

Answered
Error: Conversion to double from cell is not possible
Try x = {sum(matchcounts_ab,1) sum(matchcounts_ba,1) sum(matchcounts_AB,1)} whos x whos M You try to assign a cel...

10 years ago | 0

Answered
taking second mode from strings
You can compress your dictionary to a single string of letters and then remove the most common letter from the string. Then find...

10 years ago | 0

Answered
Compare pairs in an array with every other pair
Your code is correct. This produces all pairs in variable "pairs". A distance function is usually symmetric, so the the distance...

10 years ago | 1

| accepted

Answered
Analyze a variable number of datas
N = size(a,1) for i=1:N subplot(1,N,i), plot(a(i,:)) end

10 years ago | 0

Answered
Get the common lowest values of 2 datasets?
[~, idx] = min(a); min1 = [a(idx) b(idx)] [~, idx] = min(b); min2 = [a(idx) b(idx)]

10 years ago | 0

Answered
finding most common letter in a bunch of words
x={'abac';'abaca';'abacate';'abacay';'abacinate';'abacination';'abaciscus'}; [h c] = hist(double([x{:}]), double('a':'z')) ...

10 years ago | 0

Load more