Answered

How to delete last characters of a string

What happens if you replace name = "Motor 315S-4" with name = 'Motor 315S-4' and try name2 = name(1:end-2)? Based off this...

How to delete last characters of a string

What happens if you replace name = "Motor 315S-4" with name = 'Motor 315S-4' and try name2 = name(1:end-2)? Based off this...

meer dan 3 jaar ago | 1

| accepted

Answered

Finding multiple x values in plot for given y

I think you want fsolve. Give it a function handle and an initial starting point, and it'll tell you (approximately) what x give...

Finding multiple x values in plot for given y

I think you want fsolve. Give it a function handle and an initial starting point, and it'll tell you (approximately) what x give...

meer dan 3 jaar ago | 0

Answered

subtract two matrices of sizes [1*5] and [3*5]

Well I typed m = [1 2 3 4 5]; y = [10 11 12 13 14; 9 8 7 6 5; 15 16 17 18 19]; y-m into my matlab command window, and it re...

subtract two matrices of sizes [1*5] and [3*5]

Well I typed m = [1 2 3 4 5]; y = [10 11 12 13 14; 9 8 7 6 5; 15 16 17 18 19]; y-m into my matlab command window, and it re...

meer dan 3 jaar ago | 1

Answered

Why am I receiving the error "Array indices must be positive integers or logical values."

Line 26: Array indices must be positive integers or logical values. i is used as an index, but it isn't defined until a line lat...

Why am I receiving the error "Array indices must be positive integers or logical values."

Line 26: Array indices must be positive integers or logical values. i is used as an index, but it isn't defined until a line lat...

meer dan 3 jaar ago | 0

Answered

Undefined function 'mtimes' for input arguments of type 'function_handle'.

Your function fonk takes f as an input. f must be a function handle in order to satisfy the quad requirements. Later, you set h=...

Undefined function 'mtimes' for input arguments of type 'function_handle'.

Your function fonk takes f as an input. f must be a function handle in order to satisfy the quad requirements. Later, you set h=...

meer dan 3 jaar ago | 0

Answered

transform data from hourly to quarter hourly

https://uk.mathworks.com/help/matlab/ref/interp1.html The vector x can be datetime values.

transform data from hourly to quarter hourly

https://uk.mathworks.com/help/matlab/ref/interp1.html The vector x can be datetime values.

meer dan 3 jaar ago | 1

| accepted

Answered

How do I write a sparse matrix in MATLAB

https://uk.mathworks.com/help/matlab/ref/full.html

How do I write a sparse matrix in MATLAB

https://uk.mathworks.com/help/matlab/ref/full.html

meer dan 3 jaar ago | 2

Answered

How to change x-axis values?

This was the top result when I googled "matlab remove scientific notation axis". From R2015b onwards, ax = gca; ax.XRuler.E...

How to change x-axis values?

This was the top result when I googled "matlab remove scientific notation axis". From R2015b onwards, ax = gca; ax.XRuler.E...

meer dan 3 jaar ago | 0

Answered

The way to integrate a differentiated function(微分した関数を積分する方法)

Well the integral of a derivative is simply the function itself. For example: y(x) = x^2 + x + 5 dy/dx = 2x + 1 integral(dy/d...

The way to integrate a differentiated function(微分した関数を積分する方法)

Well the integral of a derivative is simply the function itself. For example: y(x) = x^2 + x + 5 dy/dx = 2x + 1 integral(dy/d...

meer dan 3 jaar ago | 0

Answered

Adding noise to my data set

randn is a uniformly distributed random variable with mean of zero and standard deviation of 1. To get what you want, use vari...

Adding noise to my data set

randn is a uniformly distributed random variable with mean of zero and standard deviation of 1. To get what you want, use vari...

meer dan 3 jaar ago | 0

| accepted

Answered

How to find the index of the first and last non-zero value of a vector ?

The built in command find sounds like what you need. The code could look something like f = ...0,0,0,0,0,0,0,0,5,6,7,4,3,5,6,7,...

How to find the index of the first and last non-zero value of a vector ?

The built in command find sounds like what you need. The code could look something like f = ...0,0,0,0,0,0,0,0,5,6,7,4,3,5,6,7,...

meer dan 3 jaar ago | 0

| accepted

Answered

Unrecognized function or variable

Sya is defined in the code body, but not in the function. Read up on the scope of a Matlab variable for more information. To fi...

Unrecognized function or variable

Sya is defined in the code body, but not in the function. Read up on the scope of a Matlab variable for more information. To fi...

meer dan 3 jaar ago | 0

| accepted

Answered

When i try this sym('x')^y i get an error message

I haven't used the symbolic toolbox before, but when I type 18008617784390347685963^60322355516214665580 into my Matlab commandl...

When i try this sym('x')^y i get an error message

I haven't used the symbolic toolbox before, but when I type 18008617784390347685963^60322355516214665580 into my Matlab commandl...

meer dan 3 jaar ago | 0

Question

How do I iterate over vector elements, but ignore elements which do not meet a condition?

I have a piece of code, which I'm trying to make run faster. I've used the profiler and most of the time is spent on the followi...

meer dan 3 jaar ago | 3 answers | 0

Answered

1x4 times 4x4 matrix in Matlab

Use the rules for matrix multiplication to help you. What solved one persons problem won't always solve yours. A 4x4 multiplied...

1x4 times 4x4 matrix in Matlab

Use the rules for matrix multiplication to help you. What solved one persons problem won't always solve yours. A 4x4 multiplied...

meer dan 3 jaar ago | 0

Answered

How to fix a matrix error

A (and consequently, L, D and U) is a 16x16 matrix. b is a 1x17 matrix. To fix this, either make A one bigger in each dimension,...

How to fix a matrix error

A (and consequently, L, D and U) is a 16x16 matrix. b is a 1x17 matrix. To fix this, either make A one bigger in each dimension,...

meer dan 3 jaar ago | 0

| accepted

Solved

Side of a rhombus

If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

meer dan 3 jaar ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

meer dan 3 jaar ago

Answered

I have successfully detected skin color but not able to understand the working of find function in it.

It's tricky to say when we can't run the code, but I'll give it my best shot. It seems like the code imports an image. The imag...

I have successfully detected skin color but not able to understand the working of find function in it.

It's tricky to say when we can't run the code, but I'll give it my best shot. It seems like the code imports an image. The imag...

meer dan 3 jaar ago | 0

Answered

Matlab doesn;t recognise a variable when I run the program

Your if statements aren't working because you're comparing a vector (x) to a scalar 0, L/2 or L. Instead what I think you're try...

Matlab doesn;t recognise a variable when I run the program

Your if statements aren't working because you're comparing a vector (x) to a scalar 0, L/2 or L. Instead what I think you're try...

meer dan 3 jaar ago | 0

| accepted

Answered

Error bars are automatically offset. they look correct just the error bar for any point should be located at the point before it

The scatter plot is plot(t, d40avg). The Error bar plot is plot(d40avg, d40std). At first glance it may look like the erro...

Error bars are automatically offset. they look correct just the error bar for any point should be located at the point before it

The scatter plot is plot(t, d40avg). The Error bar plot is plot(d40avg, d40std). At first glance it may look like the erro...

meer dan 3 jaar ago | 0

| accepted

Answered

Keep on getting 'Error using plot, Vectors must be the same length'. How can I plot it correctly?

When the while loop breaks, you have defined T to have length of i_max, and t has length i_max+1. This is because of the line ...

Keep on getting 'Error using plot, Vectors must be the same length'. How can I plot it correctly?

When the while loop breaks, you have defined T to have length of i_max, and t has length i_max+1. This is because of the line ...

meer dan 3 jaar ago | 0

| accepted

Question

What determines the increase in speed for parfor vs. for?

The question is simply that. I know that for some loops with a lot of overhead, it can be slower. In some cases, it can be faste...

meer dan 3 jaar ago | 0 answers | 0

Question

How do I efficiently iterate over subvectors of a given vector?

I have a vector of length N, which I want to generate all possible subvectors of of length n and sum over the subvectors. At the...

meer dan 3 jaar ago | 1 answer | 0

Answered

Function that should be continuous isn't continuously plotted?

At the origin, x and y are both zero, so the denominator of your function is undefined. For me it's returning NaN at the central...

Function that should be continuous isn't continuously plotted?

At the origin, x and y are both zero, so the denominator of your function is undefined. For me it's returning NaN at the central...

meer dan 3 jaar ago | 1

Solved

radius of a spherical planet

You just measured its surface area, that is the input.

meer dan 3 jaar ago

Solved

Given a square and a circle, please decide whether the square covers more area.

You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

meer dan 3 jaar ago

Solved

Pi Estimate 1

Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

meer dan 3 jaar ago