Community Profile

Contact

Top 5% contributor

So basically, I have to write a function that simulates the rolling of a given number of six sided dice a given number of tim...

2 Answers

0

Asked 2 years ago

Hey, it should be something like this: % x = abs(x); %in case of negative numbers y = 0; n=0 while (floor(x*10^n)~...

Answered 2 years ago

I'm having trouble converting strings that represent binary numbers to decimal and vice versa. The main issue is that I'm unsu...

Hi, I'm writing a function which simulates rolling 10 dice 5000 times. In the function,I find the sum of values of the 10 di...

1 Answers

Hi everyone, I'm trying to write a function that finds a point at which two functions f(x) and g(x) intersect, i.e., f(x) = ...

So, I tried to implement code that solves the Tower of Hanoi Problem (which I had previously used in python), and it sort of wor...

So, I have to recursively generate the entire fibonacci sequence, and while I can get individual terms recursively, I'm unable t...

Say you have a number, x, and you want to find the number of digits after the decimal point. I know that in matlab, one way to d...

How would one write their own polyfit function using only mldivide and for loops? I have a basic idea: function [A,e] = My...

Asked 3 years ago

Hey guys, I'm trying to learn how convolution works without any built in fft or conv commands, and I'm not quite sure how to...

Suppose the curve you're fitting can follow the form y = an*x^n+ an-1*x^(n-1)+...+ a1x + a0 x and y are two column vectors...

Hi, I'm having a little trouble with my newton's method code. One of my biggest issues is that I'm not able to create an out...

I'm trying to write a function that converts a string containing a number from decimal to binary (this number may include decima...

A question asks to determine write a function to solve the weighted least squares problem, without using advanced functions (lim...

Say that y = a1*f1(x)+ a2* f2(x) + ...+ an*fn(x) where x and y are column vectors, f1(x),....,fn(x) are function handles a...

Basically, I have a csv file with data about test results (the first row is a header) and it has two columns. I have to find...

0 Answers

Hi people, I'm having a bit of an issue with my Bisection Method Algorithm, which I understand conceptually, but it doesn't qui...

I'm trying to graph one log-log plot of the execution time against increasing input values for an iterative fibonacci sequenc...

So I've found one approximation of ln(x) to be 2* the sum of 1/(2n+1)*((x-1)/(x+1))^(2n+1) and I need to find the absolute and r...

I've already attempted to do this and was wondering if someone could help me with my code: function[]=plot10() x=linspace(-p...