# Joel Lynch

**Statistics**

RANK**723**

of 242,532

REPUTATION**74**

CONTRIBUTIONS

**2** Questions

**21** Answers

ANSWER ACCEPTANCE **
100.0%
**

VOTES RECEIVED**5**

RANK**12,197** of 16,997

REPUTATION**19**

AVERAGE RATING**0.00**

CONTRIBUTIONS**2** Files

DOWNLOADS **21**

ALL TIME DOWNLOADS**110**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Question

Why do logical indices implicitly reshape? Is there a workaround?

I've encountered this several times, and it always bothers me. Say for example I want to sum each row of matrix A, for values le...

2 months ago | 1 answer | 0

### 1

answerQuestion

When using "Pause on Warning/Error," is there a way to avoid breaking into built-in functions?

For example, a bad set of data when calling "fit" breaks into a function called "curvefit.attention/Warning/throw": Warning: Eq...

3 months ago | 1 answer | 0

### 1

answerBox Plots for Vectors of Varying Length

The proximate error is that the symbols around the year-range string ‘1931-1960’ are not apostrophes, so MATLAB doesn't know w...

3 months ago | 0

| accepted

Mesh Grid of a 3d array

So this may be due to confusion about how mesh() works. Mesh produces a 2D surface in a 3D volume, with the Z-axis being the val...

3 months ago | 0

| accepted

Run "if" logic on a row

The trick is to recognize that you can use & / | (and/or) to chain multiple logical operations together. In this case, you can g...

3 months ago | 0

| accepted

Solve the generalized form of the Poisson equation

I don't get an error when running your code with MATLAB version 2019b, but the bigger problem you have is that your method will ...

3 months ago | 0

| accepted

How to plot a matrix within a matrix?

In terms of organizing the data, the simplest approach is to create two matricies for stiffness and deflection that have two dim...

3 months ago | 1

| accepted

Submitted

ternary_plots

MATLAB package for creating ternary plots. Based loosely on 7210-ternary-plots by Ulrich Theune.

4 months ago | 20 downloads |

set xticks by calculation but also force 0 to be displayed

set(gca,’XTick’,array_of_values)

4 months ago | 0

Function for telling if a function is unique and how many solutions it has.

".p" files are purposefully obfuscated, so you cannot copy the code, suggesting your instructor does not want you to use someone...

4 months ago | 0

| accepted

Why do I get 'Out of Memory' error?

Out of memory is exactly what it sounds like: your program is trying to hold more data on system memory than is available. The c...

4 months ago | 1

| accepted

I need help with creating bounded logarithmic plot

Assuming you meant to have , then t = linspace(0,2*pi); x = exp(-t); % if constant, then x(1:numel(t))=exp(-1); y = t; plo...

4 months ago | 0

How to find the zero crossing in x and time data sets?

idx = find( f(2:end).*f(1:end-1)<0 ) Will return the left-hand indicies of cross-over points. To get the exact X-values where ...

4 months ago | 0

how to form a two-column array for a given but dimmension-unknown array?

You can make a row vector of any N dimensional matrix by linearizing, for example A( 1:numel(A), 1 ) = A(:); .Thus, you can a...

4 months ago | 0

Conditional Scatter plotting based on third data set

Assuming columns with 1's will only have 1's, and columns with 2's and 3's will never have 1's, then it is as simple as taking t...

4 months ago | 0

| accepted

How to take 1 row on table 1 and compute it against every row of table 2 and do this for each row in table 1

Assuming the data is read into two variables, d1(1:N1,1:3) and d2(1:N2,1:3) by d1 = xlsread('Matlab Help.xlsx','Random','B2:D31...

4 months ago | 0

| accepted

Using trapz just for positive areas

You need to use more fine-grid X data in polyval to get test points at y=0. xA_fine = linspace(xA(1),xA(end),100); fA_fine = ...

4 months ago | 1

Continue after .exe finishes

You can use system() function to pass the command (as a string) without the "!" symbol. If using unix OS, you can pipe (with the...

4 months ago | 0

| accepted

stacked plot x axis change in 2015 matlab version

bar(Y(:,1),Y(:,2:end))

4 months ago | 0

| accepted

Find the input values of a function within an output range.

If you cannot solve algebraically (no closed form solution), then fzero is the best bet. Something like this: % example y range...

4 months ago | 0

| accepted

how to fix this error 'Index in position 2 exceeds array bounds.'?

The proximate reason for the error is that "Popbest" is empty, and so acessing the first column by Popbest(:,1) throws an error....

4 months ago | 0

| accepted

How to show two axis on a plot only where i want them

You can get the handles for the left and right axes with yyaxis. yyaxis left; % Sets the current y-axis left left_ax = gca; ...

4 months ago | 0

| accepted

How can I plot the maximum values of the double matrix ?

Max() has an optional third argument that determines the index along which to take the maximum. So for a 10x20 matrix A, A_max...

4 months ago | 1

| accepted

Heat diffusion problem. Why my program is showing error when I am trying to change 'nx' value i.e. no of rows beyond 13 ? Is there any problem with time or timesteps??

It looks like you are not including the dt value in your stencil. You also need to be mindful of stability when setting the time...

4 months ago | 1

| accepted

Submitted

mat-op-ex

Matrix Operator Extraction Toolkit - Tools to obtain the matrix form of common MATLAB linear operations (e.g. trapz, interp) for...

8 months ago | 1 download |