Answered
How do you use the else if commands to alter variables in matrices?
It helps to realize that the sum of the indices is constant along anti-diagonals in a matrix (while the difference is constant a...

ungefär 12 år ago | 0

Answered
Need some help
One way to accomplish what I think you're trying to do in items (1) and (2) of your original question is the following: % ro...

ungefär 12 år ago | 0

Answered
plotting time series
Just change the assignment in your loop from ts1{i} = timeseries(x{i},1:length(x{i})); to ts1(i) = timeseries(x{i},...

ungefär 12 år ago | 1

| accepted

Answered
Reformat data
Assuming that your data lives inside someTextFile.txt, that the values in the data set are delimited/separated by tabs (\t) or s...

ungefär 12 år ago | 0

| accepted

Answered
contour plot in polar coordinates
It may be helpful to know that the line of code z = r-t defines the surface as a function of r and t. For example, if y...

ungefär 12 år ago | 0

Answered
CSV file import with timestamp
The assignment fmt = %f "%u-%u-%u %u:%u:%u+%u" %u should be fmt = '%f "%u-%u-%u %u:%u:%u+%u" %u' (notice the sin...

ungefär 12 år ago | 1

Answered
How to divide images into blocks of size 8 * 8
Replace g = mat2cell(i,[a,a],[b,b],3); with g = mat2cell(i,8*ones(1,size(i,1)/8),8*ones(1,size(i,2)/8),3); eff...

ungefär 12 år ago | 2

Answered
Zooming a portion of figure in a figure.
Below is an example that zooms in on a portion of a curve and displays the zoomed in version in the same figure window without u...

ungefär 12 år ago | 40

| accepted

Answered
3D surface (sine wave)
One possibility is to use the following: k1 = 1; %how many times you want wave to oscillate in x-dir k2 = 0; %how many t...

ungefär 12 år ago | 0

| accepted

Answered
how to create curve non linear
Not sure I entirely understand your question, but if you're trying to create a nonlinear curve that passes through the two point...

ungefär 12 år ago | 0

Answered
convert complex matrix to 3D plot
Create a domain [X,Y] = meshgrid(linspace(-pi,pi)); Evaluate f(z) = log(z) for complex z. F is a complex matrix that rep...

ungefär 12 år ago | 1

Answered
Variable "ON"
First, create C: C = zeros(size(B)); Then use this command to assign elements of B associated with nonzero A values int...

ungefär 12 år ago | 1

| accepted