Answered
Reading a CSV ... problems
Reading should be possible with textscan. You can define the format of the data columnwise. Does it help?

9 years ago | 0

Answered
Simple question about sum function
I don't know cmo, so I can only guess. If it is possible to vectorize the function, then you will get all outputs at once and ca...

9 years ago | 0

Answered
I am comparing a value to an array and trying to find out the match. But it is not working though there is a match
for i = 1:size(actTimeStamp) size returns the size of both dimensions. I guess actTimeStamp is something like [1 x N], let'...

9 years ago | 1

Answered
How to get matlab to find a point on a graph where there is a sudden change?
You can define a threshold value either for y or for diff(y). Assume you define failure as point when y>0.2: plot(x,y), ho...

9 years ago | 2

| accepted

Answered
shouldPlot and switch case and legend and multiple figure error
When I run the code inside your if case with random values, I do get the legend in figure 1. Of course, only f and g are describ...

9 years ago | 1

Answered
How do I import data files to column vectors in a loop?
I don't know your |importfile| function, but in general you can do it the following way: for fileNum = 1:numFiles f...

9 years ago | 0

| accepted

Answered
Indexing error in function code.
You initialize h as zeros. k goes from 2 to length(B). The line h(k+1) = h(k-1)/2; remains all h as zeros (and I'm ques...

9 years ago | 1

Answered
mapping numbers to another number
If you don't want to limit it to the first 9 numbers, you can also use this equation: >> x=1:15; >> y=mod(x-1,3)+...

9 years ago | 0

Answered
convert images to video
In the help to addframe, you find an example of that: http://www.mathworks.com/help/matlab/ref/avifile.addframe.html aviobj...

9 years ago | 0

| accepted

Answered
Make a good plot of the function: f(x) = sin(1/x) for 0.01 < x < 0.1. How did you create x so that the plot looks good?
In this case, I'd rather use a logarithmic spaced x instead of a linearly spaced one. I'm sure you are aware that this function ...

9 years ago | 0

Answered
scatter function for different colors
txt1=[{'A100'};{'B100'};{'C100'};{'X1'};{'X2'}]; y=[100;150;200;135;140]; x=[200;250;300;225;235]; % ...

9 years ago | 0

| accepted

Answered
calculate the value by using a formula
Dou you mean err=sqrt(sum((M-P).^2)/numel(M)); I guess "i" does not go to infinity but only to 2000 and the data in you...

9 years ago | 0

| accepted

Answered
Erroe message ..... " not assigned during call to "
Whenever n is not 1, char will not be assigned. What's the purpose of the (n == 1) condition? Possibly it's supposed to be a loo...

9 years ago | 1

| accepted

Answered
Matrix Input Problem for independent numbers
What is this code supposed to do? I must admit I don't understand it. Anyway, what I see is, that fixdof will be overwritten in ...

9 years ago | 0

Answered
rgb_sum for mutiple images
[c(i) r]=imfindcircles(I,[10 30]); Do you need the c of every image in the end? Or will you need it only temporarily in the ...

9 years ago | 0

| accepted

Answered
How do I fix the following code?
The function's name is "hist" for plotting and "histc" for only getting the values.

9 years ago | 0

| accepted

Answered
generate a matrix along the length of an inclined line
I hope I got your question right. I suppose you have a line originating at (x0/y0) with an angle alpha and a length L: L=5;...

9 years ago | 1

| accepted

Answered
Values used to run a for loop
First, you need to distinguish between an index and a value. When you want to assign a value to jobb(epsilon), epsilon is an ind...

9 years ago | 0

| accepted

Answered
how to check a path? file or folder?
Use the exist() function. It will return 2 for a file, 7 for a folder, and, in case the path does not exist at all, you'll get t...

9 years ago | 1

Answered
Error using mtimes (inner dimension must agree)
Posting a screen shot is not so helpful. It's much easier for us to help if we can simply copy-paste the code into our command w...

9 years ago | 0

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

9 years ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

9 years ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

9 years ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

9 years ago

Solved


Alkane
Given a number, x, that is equal to the number of carbons in an alkane, find, y, the number of hydrogens in the alkane.

9 years ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

9 years ago

Problem


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

9 years ago | 1 | 54 solvers

Answered
Best way to export figure of high quality
I didn't do the paper resizing here, but export_fig with zbuffer and -r600 produces quite a good figure: export_fig('D:\Doku...

9 years ago | 0

Answered
How do I simplify an equation found using the symbolic solver?
I think there's a misunderstanding: simplify does not solve anything, it just tries to simplify the equation (whatever that exac...

9 years ago | 0

Answered
How to extract column name of table in matlab
If you refer to uitable: >> f = figure('Position',[200 200 400 150]); >> dat = rand(3); >> cnames = {'X-Data','Y-Da...

9 years ago | 19

| accepted

Load more