Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

3 years ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

3 years ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

3 years ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

3 years ago

Solved


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

3 years 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.

3 years ago

Answered
How do I call a function which I have defined within a class?
This question has now been answered on Stack Overflow: https://stackoverflow.com/questions/65038867/matlab-how-do-i-call-a-fu...

3 years ago | 0

| accepted

Solved


Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

3 years ago

Question


How do I call a function which I have defined within a class?
I'm trying to learn how to use classes in Matlab, having never used them in any language before, so apologies if this is a bit b...

3 years ago | 2 answers | 0

2

answers

Answered
How to plot hyperbola curve to pints?
You need more values in your vector x. Try it with x0 = linspace(0.002, 0.2, 100); and alter your code to be hyprb = @(b,x)...

3 years ago | 0

| accepted

Solved


Find Logic 1

3 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

3 years ago

Solved


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

3 years ago

Solved


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

3 years ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

3 years ago