解決済み

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

11ヶ月 前

解決済み

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

11ヶ月 前

解決済み

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

11ヶ月 前

解決済み

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...

11ヶ月 前

解決済み

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

11ヶ月 前

解決済み

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

11ヶ月 前

解決済み

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

11ヶ月 前

解決済み

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

11ヶ月 前

解決済み

Length of the hypotenuse

Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

11ヶ月 前

解決済み

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

11ヶ月 前

解決済み

Maximum value in a matrix

Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

11ヶ月 前

回答済み

Mechatronics Simscape multibody help

Thanks for providing the model. First of all, input and output-torque will always be exactly the same, since you already provi...

Mechatronics Simscape multibody help

Thanks for providing the model. First of all, input and output-torque will always be exactly the same, since you already provi...

11ヶ月 前 | 0

| 採用済み

回答済み

How to plot humidity data on a world map?

An easy way would be to use geoscatter(). This does not interpolate but just plots the points with color according to the value....

How to plot humidity data on a world map?

An easy way would be to use geoscatter(). This does not interpolate but just plots the points with color according to the value....

11ヶ月 前 | 0

回答済み

Sinusoidal issue of ADC signals using TI Delfino F28379D LaunchPad

Here the results from the comments Possible fixes: Reducing "Fixed-step size (fundamental sample time)" Increase baud rate. H...

Sinusoidal issue of ADC signals using TI Delfino F28379D LaunchPad

Here the results from the comments Possible fixes: Reducing "Fixed-step size (fundamental sample time)" Increase baud rate. H...

11ヶ月 前 | 0

| 採用済み

回答済み

How to do interpolation on the map?

You can interpolate the datapoints with the griddata() function. As @Walter Roberson mentioned this also assumes a uniform grid,...

How to do interpolation on the map?

You can interpolate the datapoints with the griddata() function. As @Walter Roberson mentioned this also assumes a uniform grid,...

11ヶ月 前 | 0

| 採用済み

回答済み

Simscape multibody in R2022b

I do not know, why this worked for you in R2021b. I did not test it in that version, but it did not seem to work for @Shree Char...

Simscape multibody in R2022b

I do not know, why this worked for you in R2021b. I did not test it in that version, but it did not seem to work for @Shree Char...

11ヶ月 前 | 0

回答済み

How to perform a block opeartion at particular time index in simulink?

Check out the "Enabled Subsystem". Put your MATLAB function in there and only enable it on your desired timesteps. One way to d...

How to perform a block opeartion at particular time index in simulink?

Check out the "Enabled Subsystem". Put your MATLAB function in there and only enable it on your desired timesteps. One way to d...

11ヶ月 前 | 0

回答済み

simulink; Failed to connect to Arduino board, when using esp8266

A friend of mine had a similar problem. The problem is probably that you use the only serial interface (UART) of the Arduino UNO...

simulink; Failed to connect to Arduino board, when using esp8266

A friend of mine had a similar problem. The problem is probably that you use the only serial interface (UART) of the Arduino UNO...

12ヶ月 前 | 0

回答済み

How to create a link mechanism for a hydraulic excavator

If you have a complicated mechanism like that, building this in a CAD-Software and exporting it as Simscape Model is probably so...

How to create a link mechanism for a hydraulic excavator

If you have a complicated mechanism like that, building this in a CAD-Software and exporting it as Simscape Model is probably so...

12ヶ月 前 | 0

| 採用済み

回答済み

Simulink simscape multibody: Actuating a joint with changing mode

Here are my experiences using joint modes: Disengaging Disengaging after a certain amount of time works the best. If your join...

Simulink simscape multibody: Actuating a joint with changing mode

Here are my experiences using joint modes: Disengaging Disengaging after a certain amount of time works the best. If your join...

12ヶ月 前 | 0

回答済み

How to add forced displacement or oscillation into Simscape Multibody?

You can easily use the "Prismatic Joint"-Block, which is for purely translational movement along one axis. Just set the followin...

How to add forced displacement or oscillation into Simscape Multibody?

You can easily use the "Prismatic Joint"-Block, which is for purely translational movement along one axis. Just set the followin...

12ヶ月 前 | 1

| 採用済み

回答済み

How to plot capacitor voltage from a bridge rectifier with capacitor filter in MATLAB?

You can simulate the behavior with Simulink, by building a rectifier with the Simscape Electrical toolbox. The model could look ...

How to plot capacitor voltage from a bridge rectifier with capacitor filter in MATLAB?

You can simulate the behavior with Simulink, by building a rectifier with the Simscape Electrical toolbox. The model could look ...

12ヶ月 前 | 0

回答済み

How to compute 8 days mean from one year data?

I would use the moving average function (movmean) data_table = readtable('sample.csv'); % reading as TABLE data_matrix = ta...

How to compute 8 days mean from one year data?

I would use the moving average function (movmean) data_table = readtable('sample.csv'); % reading as TABLE data_matrix = ta...

12ヶ月 前 | 0

回答済み

How to generate normal distribution from an array?

You could do it in a small for loop: A = [2.29441228002842 17.3351873969651 2.79928860040389 7.17554281085515; 3.1620041565948...

How to generate normal distribution from an array?

You could do it in a small for loop: A = [2.29441228002842 17.3351873969651 2.79928860040389 7.17554281085515; 3.1620041565948...

12ヶ月 前 | 0

回答済み

Problem renaming variable in loop

Having 150 variables all having to do with one thing is not good coding. You should use a matrix/array/cells instead. Also using...

Problem renaming variable in loop

Having 150 variables all having to do with one thing is not good coding. You should use a matrix/array/cells instead. Also using...

12ヶ月 前 | 0

回答済み

Convert symbolic inequality to matrix form

Moved my comment to an answer (to be accepted only if satisfied): syms x y eq = 2*x + 3*y <= 5; % inequality eq1 = lhs(e...

Convert symbolic inequality to matrix form

Moved my comment to an answer (to be accepted only if satisfied): syms x y eq = 2*x + 3*y <= 5; % inequality eq1 = lhs(e...

12ヶ月 前 | 0

回答済み

Enter a velocity and a specific acceleration to a motion

There are multiple ways of doing it. I'm just using constant acceleration examples since those are the easiest. But I just want ...

Enter a velocity and a specific acceleration to a motion

There are multiple ways of doing it. I'm just using constant acceleration examples since those are the easiest. But I just want ...

12ヶ月 前 | 0

回答済み

I want to correct the trajectory of the double pendulum model.

How are you sure, that the left image is the correct/ideal trajectory? For me it seems that the right side is more accurate. You...

I want to correct the trajectory of the double pendulum model.

How are you sure, that the left image is the correct/ideal trajectory? For me it seems that the right side is more accurate. You...

12ヶ月 前 | 0

回答済み

How to move a simulink model with solidworks model to another new pc?

Did you execute/Run your "haha_Datafile.m"? Mabe just running it in your current workspace once will load the needed variables i...

How to move a simulink model with solidworks model to another new pc?

Did you execute/Run your "haha_Datafile.m"? Mabe just running it in your current workspace once will load the needed variables i...

12ヶ月 前 | 0