Risolto


Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.

circa 10 anni fa

Risolto


Solve expression III
Solve expression for given vector x. Expression = (tan(2*x^2+7*x-30.25)+log(x^3-2.25))/(nthroot(sin(x^3)^2+1/5*log(x^4-2.5),3))...

circa 10 anni fa

Risolto


Calculate cross product
Make function for cross product a=[1 3 2]; b=[2 4 1]; y=function(a,b) y=[-5 3 -2]

circa 10 anni fa

Risolto


Make random permutation
Make random permutation that consist of random number from 1 to n.

circa 10 anni fa

Risolto


Save variables
a=[1] Save variable a that is located in workspace into current folder. File name should be 'a.mat'

circa 10 anni fa

Risolto


Transpose Matrix Without Using Built-in Matlab Function
Transpose Matrix Without Using Built-in Matlab Function Example a = [1;2;3] out = [1 2 3]

circa 10 anni fa

Risolto


Bae Slap Counter LOL XD
How many times did your bae had slapped you? Create a formula counts how many times you are slapped

circa 10 anni fa

Risolto


Make sorting matrix without sort function.
It is very valuable for student to simple sorting program because they learn about use of loop and if-statement. Sort given inpu...

circa 10 anni fa

Risolto


Make random number between a and b
Function rand make arbitrary number between 0 and 1. Using inputs, a, and b, make random number between given two values.

circa 10 anni fa

Risolto


Calculate using 'for' statements
Equations are easily calculated using matlab. Especially, when we calculate multivariable(more than two) variables, "meshgrid" f...

circa 10 anni fa

Risolto


Analyze observation data
There are results of observation. A B C -------------------------- t=1 2.2 2.6 2.4 t=2 2.4 ...

circa 10 anni fa

Risolto


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

circa 10 anni fa

Risolto


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

circa 10 anni fa

Risolto


Create a constant offset.
Add a constant offset to an array. For example: a=[1 3 5 9]; offset=2; y=[3 5 7 11];

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

circa 10 anni fa

Risolto


This is just like your weight :)
Imagine your weight as a sawtooth wave appended with a slope It varies yet the trend is increasing :) Decode the values throug...

circa 10 anni fa

Risolto


Calculate the answer to life the universe and everything
<https://en.wikipedia.org/wiki/42_(number)>

circa 10 anni fa

Risolto


Nth root
Nth root of a number x

circa 10 anni fa

Risolto


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

circa 10 anni fa

Risolto


Create a code for XNOR
Given two inputs, output XNOR of those two

circa 10 anni fa

Risolto


Convert degrees to radians
Given input in degrees, output to radians

circa 10 anni fa

Risolto


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1 1 1]

circa 10 anni fa

Risolto


Convert radians to degrees
Given input in radians, output to degrees

circa 10 anni fa

Risolto


Calculate inverse matrix in m by n matrix
x=(1:10)' y=roundn(2*x+7*rand(size(x)),-1) a*x=y Estimate a using inverse matrix calculation. This is principle of li...

circa 10 anni fa

Risolto


How to check matrix's size?
x=randi(100) y=randi(100) A=zeros(x,y) Can you measure size of matrix A?

circa 10 anni fa

Risolto


Calculate some equation
Using given inputs x and z, make two outputs that are y1=(xz)/(x/z)^2+14x^2-0.8z^2 y2=x^z-z^x+(x/z)^2-(z/x)^2

circa 10 anni fa

Risolto


Calculate numerical integration.
x=0:0.01:1 y=x.^2 Calculate area from x=0 to x=1, and y=0 to y=x^2 using numerical integration. (hint: trapz)

circa 10 anni fa

Risolto


Interpolate scattered data.
Most data was scattered, and there is no gird. There are three data [c] in three different area [x,y]. x=[1 3 4]; y=[1 ...

circa 10 anni fa

Risolto


Calculate RMSE
RMSE(Root Mean Square Error) is widely used to calculate error. Calculate RMSE between [a] and [b] a=[1 2 3 4] b=[0 1 2 ...

circa 10 anni fa

Carica altro