Community Profile

# Michael Croucher

##### Last seen: 4 days ago
20 total contributions since 2020

View details...

Contributions in
View by

Solved

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

5 days ago

Solved

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

5 days ago

Can I schedule a job in Matlab online
One way of achieving your aim would be to use the public cloud. Compile your .m file using MATLAB Compiler, install it on a clo...

7 days ago | 0

stl export for geometry from pointcloud/array
I should start this answer with 'I have no idea what I'm doing here'. I found your question interesting and have had a go at it...

14 days ago | 0

| accepted

Solved

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

21 days ago

How do I write a 3D matrix to a file, and then read it back in?
I haven't played with the matfile function in this way before so tried a little experiment that may also serve to help you use t...

27 days ago | 1

Solved

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

29 days 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:...

29 days ago

Compiling matlab code for the cluster
You need to compile on a Linux machine. You may find that you can compile on the cluster in question -- something to check with...

29 days ago | 0

Path between 2 nodes in a graph
One way to proceed would be to use concomp. Take this example graph s = [1 2 2 3 3 3 4 5 5 5 8 8]; t = [2 3 4 1 4 5 5 3 6 7 9...

29 days ago | 0

| accepted

No print contents in slurm.out files
I can't test this as I don't currently have access to a SLURM cluster with MATLAB on it. I guess you submit jobs using the sbat...

29 days ago | 0

| accepted

How to insert multiple spreadsheets to a workbook from Matlab
You can add the number of sheets as an extra argument. So, for 5 sheets: eNewSheet = Add(eSheets,[],eSheet1,5);

29 days ago | 0

| accepted

How to import symbolic expressions from Python to MATLAB?
Imagine your friend had a Python function that created that expression. Let's call it create_symbolic_expression() and put it i...

29 days ago | 2

| accepted

Import excel data from web doesn't work
The main issue is that MATLAB doesn't recognise what Sheet name within that spreadsheet that you want to import. This gets you ...

30 days ago | 0

| accepted

fmincon optimization in matlab using OutputFcn
Following the advice at https://uk.mathworks.com/help/matlab/math/output-functions.html, we can use the 'OutputFcn' option. By ...

1 month ago | 0

| accepted

fsolve options generate different results
We can learn a little more by asking for more output from fsolve [x,~,~,output_no_options] = fsolve(fun,x0); opts = optimopt...

1 month ago | 0

| accepted

How to get convergence in Gradient descent algorithm?
Here's my MATLAB port of that code data=dlmread('data.csv'); X = data(:,1); Y = data(:,2); %Building the model m = 0; c ...

1 month ago | 1

| accepted

Unary operator '-' is not supported for operand of type 'function_handle' in for loop function
You have defined D as a function but in line 36 you are not using it as a function. You have defined it as a function of a vari...

1 month ago | 1

| accepted