Answered
plotting an engine characterisstic map
Sounds like contourf is the function you are looking for: <http://www.mathworks.se/help/techdoc/ref/contourf.html>, If you...

13 years ago | 0

| accepted

Answered
How to search pathname for string
You are comparing two strings for equality, and the comparison is not case sensitive (help strcmpi). What you wanted to do, I gu...

13 years ago | 0

| accepted

Answered
How can stop "while" loop
Your condition should be [x y z] = size(U3); condZ = sum(sum(sum(U3,3) == z)) > 0; condY = sum(sum(sum(U3,2) == y)) >...

13 years ago | 1

Answered
values in falling in each histogram bin
sig=randn(1,440); %random data set bin1=round(1+log2(size(sig,2))); %optimal number of bins edges = linspace(min(sig), m...

13 years ago | 1

Answered
How do I save a workspace variable to a .txt file?
save('myFile.txt', 'excel', '-ASCII','-append');

13 years ago | 6

| accepted

Answered
How can I forecast an integer related to other 5 numbers?
Quick solution, you can try multiple linear regression: data = rand(10,5); res = rand(10,1); betahat = regress(res,data)...

13 years ago | 0

Answered
Problem using interp1 cubic
Try inverting your x y data interp1(x,y,...) to interp1(y,x,...) Cheers!

13 years ago | 2

Answered
Plotting fit and data on the same plot - define endpoint of fit line
Maybe this is what you want: x=sort(rand(10,1)); y=sort(rand(10,1)); [fiteqn,rsqr] = fit(x,y,'poly1'); plot(x,y); ...

13 years ago | 0

| accepted

Answered
Can interp1 function be used when the time interval of data isn't uniform?
Yes, but the longer your interval the more uncertain your results.

13 years ago | 0

| accepted

Answered
About interp1.m (1D interpolation) function?
Interp1 draws segments between succesive points. If there are two points with the same ordinate, the problem is which one to cho...

13 years ago | 1

Answered
ode parallel processing help
PARFOR loops can not be nested. So rewrite your code to avoid the double for loop. For that you can create a matrix of indices: ...

13 years ago | 1

Answered
Assignment has more non-singleton rhs dimensions than non-singleton subscripts, please help
Hello In your code newfilename=char(filename); is an array of characters, that you then try to assign strings to: ...

13 years ago | 0

Answered
textread not working with .text file
You could use: [A,' ', 1] = importdata('myFile.txt); %And the variables you want: col1 = A.data(:,1); col2 = A.dat...

13 years ago | 0

| accepted

Answered
Read or write in the .xlsx files
I'll make it an answer. I think you can, see the link: <http://www.mathworks.se/matlabcentral/answers/46161#comment_95151>...

13 years ago | 1

| accepted

Answered
genetic algorithm- need help
In Matlab, when you have two matrices, say A of size 3 * 4, and B of size 4 * 12, if you multiply A*B the result will be a matri...

13 years ago | 0

Answered
How can I add a new toolbox to an existing installation of Matlab R2011a?
Have a look: <http://www.mathworks.se/support/solutions/en/data/1-1CBD3/?solution=1-1CBD3> Cheers!

13 years ago | 0

Answered
How to delimit the number of decimal places in a colorbar?
contourf(peaks(60)) colormap cool h=colorbar('location','southoutside'); yt=get(h,'XTick'); set(h,'XTick...

13 years ago | 0

| accepted

Answered
Is there a way to dynamically save a plot figure into a jpeg file without having to type the filename i would be saving it into?
saveas(figureHandle,['filename' num2str(numberId) '.jpg']); For more info: help saveas Cheers!

13 years ago | 0

| accepted

Answered
Unmatched Matrix multiplication in Cell Arrays to create reducing count.
Assuming your array is called data: data=[100000;data]; data = cumprod(data); Cheers!

13 years ago | 0

| accepted

Answered
difference between using interp1( X,Y, xi, 'linear', 'extrap') and doing the extrapollation after curve fitting
The methods are different and will not give the same results. The curve fit will fit a line (one and only one) to all your po...

13 years ago | 0

| accepted

Answered
Fitting with constrained coefficients
You might want to have a look at: fminsearchbnd, that you can find in the file exchange : <http://www.mathworks.com/matlabcen...

13 years ago | 0

Answered
My problem is, the display of my plot were dots. how will i able to display it with a curve line. the main code shoud be inside of the for loop.
You are plotting point by point. You might want to try: x=0.3:0.01:0.5; y=15e-9*exp(x/25e-3)-1; plot(x,y,'k-'); %blac...

13 years ago | 1

Answered
ANDing Areas of multiple polygons given vertices
You might want to use polybool: help polybool Cheers!

13 years ago | 1

| accepted

Answered
Reading xls with special characters.
Sounds like you need to change Matlab's character encoding. help slCharacterEncoding You probably need to set is as: ...

13 years ago | 0

Solved


Add two numbers
Given a and b, return the sum a+b in c.

13 years ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

13 years ago

Solved


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

13 years ago

Solved


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

13 years ago

Solved


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

13 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

13 years ago

Load more