Solved

Area of a Square

Inside a square is a circle with radius r. What is the area of the square?

4 Monate ago

Solved

Calculate distance travelled when given radius and rotations

When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

4 Monate ago

Solved

Back to basics 15 - classes

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

4 Monate ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

4 Monate ago

Solved

Find the maximum number of decimal places in a set of numbers

Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

4 Monate ago

Answered

How do I assign different solutions from a function as different variables?

Hope this helps. syms x S = (solve(x^2==x,x))'; x1=double(S(1)); x2=double(S(2));

How do I assign different solutions from a function as different variables?

Hope this helps. syms x S = (solve(x^2==x,x))'; x1=double(S(1)); x2=double(S(2));

4 Monate ago | 1

| accepted

Answered

making an Xn sequence

Hope this helps. x1 and x2 are the 1st and 2nd terms of the sequence respectively. n is the nth term you want. x1=%the first nu...

making an Xn sequence

Hope this helps. x1 and x2 are the 1st and 2nd terms of the sequence respectively. n is the nth term you want. x1=%the first nu...

4 Monate ago | 0

Answered

solving the pendulum differential equation with a for loop

Hope this helps. The solution for the differential equation is obtained as cSol(t). The required solution is obtained as a row v...

solving the pendulum differential equation with a for loop

Hope this helps. The solution for the differential equation is obtained as cSol(t). The required solution is obtained as a row v...

4 Monate ago | 0

| accepted

Solved

Make roundn function

Make roundn function using round. x=0.55555 y=function(x,1) y=1 y=function(x,2) y=0.6 y=function(x,3) ...

4 Monate ago

Solved

Rounding off numbers to n decimals

Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

4 Monate ago

Solved

Matlab Basics - Rounding III

Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

4 Monate ago

Solved

Matlab Basics - Rounding II

Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

4 Monate ago

Solved

Check that number is whole number

Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

4 Monate ago

Solved

MATLAB Basic: rounding IV

Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

4 Monate ago

Solved

MATLAB Basic: rounding III

Do rounding towards minus infinity. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 8

4 Monate ago

Solved

MATLAB Basic: rounding II

Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

4 Monate ago

Solved

MATLAB Basic: rounding

Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

4 Monate ago

Answered

How can i solve P(x,y) with 2 equations of diff

If initial conditions are given, then this code might help. clc; clear; syms a b p x y u v c P t1 t2 u=(a*x)+b; v=(-a*y)+(...

How can i solve P(x,y) with 2 equations of diff

If initial conditions are given, then this code might help. clc; clear; syms a b p x y u v c P t1 t2 u=(a*x)+b; v=(-a*y)+(...

4 Monate ago | 0

| accepted

Answered

How do I plot yy'+2x=3; y(1)=-6 on matlab livescript?

I got the plot for the given differential equation with the given initial condition using this function "diff_eqn1" function so...

How do I plot yy'+2x=3; y(1)=-6 on matlab livescript?

I got the plot for the given differential equation with the given initial condition using this function "diff_eqn1" function so...

4 Monate ago | 0

Answered

The power funciton in math function block does not correctly work.

When “signed power” is checked, it first calculates the power of absolute value of input and then multiplies it with sign of the...

The power funciton in math function block does not correctly work.

When “signed power” is checked, it first calculates the power of absolute value of input and then multiplies it with sign of the...

4 Monate ago | 0

Answered

how to solve multiple equations that use the same variable but different values

Hi, I have created a function find_velocity in which the input is c (In this case c=[3,10]). The output v is a 2*2 matrix in whi...

how to solve multiple equations that use the same variable but different values

Hi, I have created a function find_velocity in which the input is c (In this case c=[3,10]). The output v is a 2*2 matrix in whi...

4 Monate ago | 0

Answered

colocar resultados en x,y,z cuando es un sistema con infinitas soluciones

I think this should work. ui = [3 2 -5; -1 2 -1; -2 1 1]; b=[0;-8;-7]; uiu=[ui b]; rangoui=rank(ui); rangouiu=rank(uiu); d...

colocar resultados en x,y,z cuando es un sistema con infinitas soluciones

I think this should work. ui = [3 2 -5; -1 2 -1; -2 1 1]; b=[0;-8;-7]; uiu=[ui b]; rangoui=rank(ui); rangouiu=rank(uiu); d...

4 Monate ago | 1

Answered

how to generate modulus of sine wave using if-else statement

I think this should work. t=linspace(0,2*pi,1000); i=sin(t); for j=1:length(i) if i(j)>=0 c(j)=i(j); else c(j)=-1*i(j); ...

how to generate modulus of sine wave using if-else statement

I think this should work. t=linspace(0,2*pi,1000); i=sin(t); for j=1:length(i) if i(j)>=0 c(j)=i(j); else c(j)=-1*i(j); ...

4 Monate ago | 0

Answered

Can anyone help me with the name of this block?

This is the "Rate Transition" block in HDL Coder library in Simulink.

Can anyone help me with the name of this block?

This is the "Rate Transition" block in HDL Coder library in Simulink.

4 Monate ago | 0

| accepted

Answered

How to model an equation?

I think this should work. When you give time t1 for which the velocity you want, and the depth of the container as input, the fu...

How to model an equation?

I think this should work. When you give time t1 for which the velocity you want, and the depth of the container as input, the fu...

4 Monate ago | 0

| accepted

Solved

Factorial Numbers

Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

4 Monate ago

Solved

Find the square of the sum of the digits of a number

If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

4 Monate ago