Question

Separate out every fourth element of a Vector

I have a 400x1 vector, I essentially need to take the first 3 elements from the vector and put them in a new vector, skip the fo...

6 days ago | 2 answers | 0

Question

Reflecting a Curve on a Graph

I have produced the following graph I basically want to slide the curve down so that it starts at 0 rather than at 0.5932 and...

23 days ago | 1 answer | 0

Question

Switching an array of Vectors from Cartesian to Spherical Coordinates

I have a 3 x 46 array called V which I am viewing as an array of 46 column vectors in Cartesian components, I am attempting to s...

25 days ago | 3 answers | 0

Question

Using a Subroutine to Create a Plot

I have the following subroutine which takes a point with radius 1 and then finds a velocity vector at that point. p = [0.282 0 ...

27 days ago | 1 answer | 0

Question

Matrix Dimension in Subroutine

I am basically trying to write a subroutine where I loop over N vectors called rij and then create a 3*3N array by evaluating ea...

1 month ago | 1 answer | 0

Question

Taking out entries of a Vector to make a new Vector

I have a 400 x 1 column vector, is it possible to 'splice' out every 4-th entry of that vector to end up with a 100 x 1 column v...

1 month ago | 1 answer | 0

Question

Loop not working properly

I have a piece of code which creates a 3 x 46 array theta = 0; phi = pi/4; r = 1 : 0.2 : 10; theta = repmat(theta,size(r))...

1 month ago | 1 answer | 0

Question

Plotting a Figure for Velocity/Temperature as One moves along a 'radial line' in steps of 0.2

I have results for velocity and temperature due to a flow when you choose fix theta and phi in spherical polar coordinates and m...

1 month ago | 0 answers | 0

Question

Creating a Matrix from Distances between Vectors

I start with a 3 x 46 array where each 3 x1 column in the array is viewed as a position vector of a point, let's say the first v...

1 month ago | 2 answers | 0

Question

Creating an Array for Different Radial Positions

I am basically looking to take a point in spherical polar coordinates such that theta = 0, phi = pi/2 and r = 1, then extend out...

1 month ago | 1 answer | 0

Question

Not Enough Input Arguments

I am attempting to run someone else's code (not well written, I appreciate), it begins as: function save_data_R13_MFS(build_var...

2 months ago | 1 answer | 0

Question

How to Import Data from another MATLAB file?

I have a MATLAB file which creates a 400x1 array when I run it, I would basically like to copy the data from that array over int...

2 months ago | 1 answer | 0

Question

Labelling Curves on a Graph

I have the following graph as shown below: Rather than having a legend, I would like to have the curves labelled, so for exap...

2 months ago | 1 answer | 0

Question

How to get a Scalar from a Matrix and Two Vectors

If I am given a 3x3 matrix A and two 3x1 vectors X,Y I basically need to multiply them out with each other to get a scalar. My ...

8 months ago | 1 answer | 0

Answered

How to Plot a Graph for a Range of Values

I'm not sure if that will work, I will give an example of the code to see if that helps. Basically, there is a parameter Kn whi...

How to Plot a Graph for a Range of Values

I'm not sure if that will work, I will give an example of the code to see if that helps. Basically, there is a parameter Kn whi...

10 months ago | 0

Question

How to Plot a Graph for a Range of Values

I am working on a problem in mechanics and have obtained an expression for the force on an object: the expression contains sever...

10 months ago | 2 answers | 0

Answered

How can I convert into new coordinates over a loop?

I will show you what I am intending, basically I have a piece of code which creates a 3 x N array depending on the values I choo...

How can I convert into new coordinates over a loop?

I will show you what I am intending, basically I have a piece of code which creates a 3 x N array depending on the values I choo...

10 months ago | 0

Question

How to Index Points and Store them all in an Array

I am working with a surface on which I place an arbitrary number of nodes. The points are indexed in spherical polar coordinate...

11 months ago | 1 answer | 0

Question

How can I convert into new coordinates over a loop?

I am working with a set of vectors for a calculation: the vectors are obtained in spherical polar coordinates and I then need to...

11 months ago | 2 answers | 0