www.cmccomb.com

sites.psu.edu/hsdl

Submitted

Reduced Rank Regression

Multivariate regression via rank reduction.

casi 2 años ago | 2 downloads |

Submitted

PipeWrench

Solve fluid networks with finite element method

alrededor de 4 años ago | 1 download |

Submitted

gplot3: plotting simple graphs in 3d

Plot simple graphs in 3d

más de 4 años ago | 3 downloads |

Submitted

Cubic Splines Made Easy

Fits a set of cubic splines to given data, and returns an inline function.

más de 4 años ago | 3 downloads |

Solved

Sum the numbers on the main diagonal

Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

casi 5 años ago

Solved

Distance walked 3D

suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

casi 5 años ago

Solved

Arrange vector in ascending order

Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

casi 5 años ago

Answered

Is there a mathwork about tensegrity structure?

You might want to start <http://www.markschenk.com/tensegrity/files.html here> .

Is there a mathwork about tensegrity structure?

You might want to start <http://www.markschenk.com/tensegrity/files.html here> .

casi 5 años ago | 1

| accepted

Solved

Replace Vector Elements

Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

casi 5 años ago

Solved

Back to basics 7 - Equal NaNs

Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

casi 5 años ago

Solved

Back to basics 21 - Matrix replicating

Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

casi 5 años ago

Answered

loop for extracting columns of a matrix

If you have a matrix, M, you can access column i (as a vector) by using M(:, i). (The colon indicates 'every row')

loop for extracting columns of a matrix

If you have a matrix, M, you can access column i (as a vector) by using M(:, i). (The colon indicates 'every row')

casi 5 años ago | 0

Answered

Remove intercept with "regress"

I think that all you need to do is remove the first column from your second argument (i.e. the column of 1's). [b17, bint1...

Remove intercept with "regress"

I think that all you need to do is remove the first column from your second argument (i.e. the column of 1's). [b17, bint1...

casi 5 años ago | 0

Answered

Replacing elements in matrix columns

You can do the replacement using logical indexing. The replacement for 34 --> 1 would be as follows: for i=2:3 idx = (...

Replacing elements in matrix columns

You can do the replacement using logical indexing. The replacement for 34 --> 1 would be as follows: for i=2:3 idx = (...

casi 5 años ago | 0

Answered

can i change the x axis without changing the plot? So i have a array with 10000 numbers in it, i want to plot thoes 10000 numbers in time, like 0-10sec insted of 0-10000.

You just need to supply a vector of x values. Something like x = linspace(0, 10, length(buf)); Then, just plot as ...

can i change the x axis without changing the plot? So i have a array with 10000 numbers in it, i want to plot thoes 10000 numbers in time, like 0-10sec insted of 0-10000.

You just need to supply a vector of x values. Something like x = linspace(0, 10, length(buf)); Then, just plot as ...

casi 5 años ago | 0

| accepted

Answered

Can anyone explain from the third line till the end of below code..??

The third line from the end contains only the word 'else'. This is typical syntax for the if control structure. In the example, ...

Can anyone explain from the third line till the end of below code..??

The third line from the end contains only the word 'else'. This is typical syntax for the if control structure. In the example, ...

casi 5 años ago | 0

Answered

Creating Multiple Windowed Plots

You can use the command figure() to open a new window to plot in.

Creating Multiple Windowed Plots

You can use the command figure() to open a new window to plot in.

casi 5 años ago | 0

| accepted

Answered

save txt file in loop

You could do something like this using the dlmwrite function: for i=1:1:50 dlmwrite(sprintf('%d.txt', i), magic(i));...

save txt file in loop

You could do something like this using the dlmwrite function: for i=1:1:50 dlmwrite(sprintf('%d.txt', i), magic(i));...

casi 5 años ago | 0

Answered

How do I change the resolution of an image produced by imagesc?

To use imresize, you first read the image in: a = imread('image.jpg'); Then, you apply imresize as follows (for example ...

How do I change the resolution of an image produced by imagesc?

To use imresize, you first read the image in: a = imread('image.jpg'); Then, you apply imresize as follows (for example ...

casi 5 años ago | 0

Answered

How to draw smooth balls (spheres) and sticks (cylinders) around my XYZ points.

This should do what you're looking for regarding the spheres (but see my above comment for cylinders). % Parameters SPHE...

How to draw smooth balls (spheres) and sticks (cylinders) around my XYZ points.

This should do what you're looking for regarding the spheres (but see my above comment for cylinders). % Parameters SPHE...

casi 5 años ago | 1

Answered

finding slope of a curve at some specific points

You might want to start by looking at MATLAB's gradient function. You could also use simple finite difference formulas, like: ...

finding slope of a curve at some specific points

You might want to start by looking at MATLAB's gradient function. You could also use simple finite difference formulas, like: ...

casi 5 años ago | 1

Answered

Fast interp1 with 'spline'

Are you calling interp1 with a vector or lookup points? If not, doing so could give you a significant speed-up.

Fast interp1 with 'spline'

Are you calling interp1 with a vector or lookup points? If not, doing so could give you a significant speed-up.

casi 5 años ago | 0

Answered

Data vectors with different time intervals

You should interpolate the temperature data. You can do this using a variety of methods, which you can find <http://www.mathwork...

Data vectors with different time intervals

You should interpolate the temperature data. You can do this using a variety of methods, which you can find <http://www.mathwork...

casi 5 años ago | 0

Answered

How significantly does the platform Matlab is run on affect numerical precision?

This difference could be a result of slightly different <http://www.netlib.org/blas/ BLAS> implementations. <http://www.mathw...

How significantly does the platform Matlab is run on affect numerical precision?

This difference could be a result of slightly different <http://www.netlib.org/blas/ BLAS> implementations. <http://www.mathw...

casi 5 años ago | 0

Answered

3D mesh/surf plot puzzle

You should try using the bar3 function, as follows: bar3(img, 1.0) The 1.0 sets the width to unity, so that the bars a...

3D mesh/surf plot puzzle

You should try using the bar3 function, as follows: bar3(img, 1.0) The 1.0 sets the width to unity, so that the bars a...

casi 5 años ago | 1

| accepted

Solved

Number of Horns on a unicorn!

Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

casi 5 años ago

Solved

Clean the List of Names

Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

casi 5 años ago

Answered

Displaying the order of objects on an axis

You're having this problem because the rectangle command draws the object in the xy plane, with z=0. Therefore, since I'm guessi...

Displaying the order of objects on an axis

You're having this problem because the rectangle command draws the object in the xy plane, with z=0. Therefore, since I'm guessi...

casi 5 años ago | 0

| accepted

Solved

Back to basics 15 - classes

Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

casi 5 años ago