Solved

Morse Code Generator! Try it!

.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

ungefär ett år ago

Solved

Split bread like the Pharaohs - Egyptian fractions and greedy algorithm

How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

ungefär ett år ago

Answered

Recreate Matlab figure in Excel?

You can always use ActiveX (this will be phased out in a future version of MATLAB) to build plots directly in your Excel file. H...

Recreate Matlab figure in Excel?

You can always use ActiveX (this will be phased out in a future version of MATLAB) to build plots directly in your Excel file. H...

ungefär ett år ago | 0

Answered

Read only numerical value or seperate data using deliminater

Assuming that you ultimately want to extract the date/time and resistance values, and assign them to separate variables, the fol...

Read only numerical value or seperate data using deliminater

Assuming that you ultimately want to extract the date/time and resistance values, and assign them to separate variables, the fol...

ungefär ett år ago | 0

| accepted

Answered

Extracting second number after comma within parenthesis

Assuming that the number will always be in scientific notation, then the following should work. TOC = regexp(str,'(?<=\(.*?,)\d...

Extracting second number after comma within parenthesis

Assuming that the number will always be in scientific notation, then the following should work. TOC = regexp(str,'(?<=\(.*?,)\d...

ungefär ett år ago | 2

| accepted

Answered

Using strcmp with multiple inputs

You can use strcmpi, which is a non-case-sensitive version of strcmp. B = find(strcmpi(rw(:,3),'boskalis westminster dredging l...

Using strcmp with multiple inputs

You can use strcmpi, which is a non-case-sensitive version of strcmp. B = find(strcmpi(rw(:,3),'boskalis westminster dredging l...

ungefär ett år ago | 0

Answered

Modify Strings in cell array according to pattern

Let me know how this works for you. B = {'C3H7O';'C2H7O2';'C2H7O2+';'C4H5O';'C4H5O';'C3H3O2';'';'C4H7O';'C3H5O2';'C3H7O2';'C2H5...

Modify Strings in cell array according to pattern

Let me know how this works for you. B = {'C3H7O';'C2H7O2';'C2H7O2+';'C4H5O';'C4H5O';'C3H3O2';'';'C4H7O';'C3H5O2';'C3H7O2';'C2H5...

ungefär ett år ago | 1

| accepted

Answered

Problems with min and max functions

Since you are defining your function as having a input x, you do not need to redfine it within your function. You can also achie...

Problems with min and max functions

Since you are defining your function as having a input x, you do not need to redfine it within your function. You can also achie...

ungefär ett år ago | 1

| accepted

Answered

Modify Strings in cell array according to pattern

I am sure that there is a much more elegant method using just regular expressions, but the following should give you what you ar...

Modify Strings in cell array according to pattern

I am sure that there is a much more elegant method using just regular expressions, but the following should give you what you ar...

ungefär ett år ago | 0

Answered

How do I construct this function?

The following should accomplish what you are asking. function TF = issquare(A) % Verifies that A is a numerical matrix with ...

How do I construct this function?

The following should accomplish what you are asking. function TF = issquare(A) % Verifies that A is a numerical matrix with ...

ungefär ett år ago | 0

| accepted

Answered

Output argument ‹variable› (and maybe others) not assigned during call to ‹function›

Currently, you have only decleared pdf as an output argument at the start of your function, but have neglected to assign a value...

Output argument ‹variable› (and maybe others) not assigned during call to ‹function›

Currently, you have only decleared pdf as an output argument at the start of your function, but have neglected to assign a value...

ungefär ett år ago | 0

Answered

matlab legend dotted lines

Without knowing whether your x and y inputs used in the plot function are vectors or arrrays it is hard to derive a working solu...

matlab legend dotted lines

Without knowing whether your x and y inputs used in the plot function are vectors or arrrays it is hard to derive a working solu...

ungefär ett år ago | 0

Answered

How can I subplot 3 graphs with errors barr and different characteristics?

Replace the lines containing the subplot functions with the following: ... subplot(3,1,1) ... subplot(3,1,2) ... subplot(3...

How can I subplot 3 graphs with errors barr and different characteristics?

Replace the lines containing the subplot functions with the following: ... subplot(3,1,1) ... subplot(3,1,2) ... subplot(3...

ungefär ett år ago | 0

| accepted

Answered

"surf" overwrites axis properties

Try reordering your properties so that they are assigned after you use the surf function. fig = figure; ax = axes('Parent',fig...

"surf" overwrites axis properties

Try reordering your properties so that they are assigned after you use the surf function. fig = figure; ax = axes('Parent',fig...

ungefär ett år ago | 0

Answered

App Designer KeyPress callback for a Tree

Chris, As you mentioned, App Designer Trees do not yet have a KeyPress callback. While the UIFigure does have this callback, th...

App Designer KeyPress callback for a Tree

Chris, As you mentioned, App Designer Trees do not yet have a KeyPress callback. While the UIFigure does have this callback, th...

ungefär ett år ago | 0

| accepted

Solved

Additive persistence

Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

ungefär ett år ago

Solved

Convert Roman to Arabic Numerals

Based upon what I see on tv and at the movies, the use of Roman numerals indicates something is important or sophisticated (e.g....

ungefär ett år ago

Solved

Math with Roman Numerals

Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

ungefär ett år ago

Solved

Checkmate-02

This is an extension of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45238-checkmate> If the king is in...

ungefär ett år ago

Solved

7 segment LED display

Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: <http://...

ungefär ett år ago

Solved

Converting numbers back from extended form

Thanks for all the help you guys gave me on writing out the numbers in extended form in <http://www.mathworks.com/matlabcentral/...

ungefär ett år ago

Solved

Numbers in extended form

Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

ungefär ett år ago

Solved

Decode a simplified barcode

Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

ungefär ett år ago

Solved

Make a simplified barcode

Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

ungefär ett år ago

Solved

Ripping numbers apart!

So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

ungefär ett år ago

Answered

Efficient matrix operation: how to avoid for loop

Roberto, this should help with consolidating your code as well as improving the overall performance. Benchtests that I ran were ...

Efficient matrix operation: how to avoid for loop

Roberto, this should help with consolidating your code as well as improving the overall performance. Benchtests that I ran were ...

ungefär ett år ago | 2

| accepted

Answered

Matlab App Designer: Update plot during loop in a function

Assuming that your plot function is part of the while loop and you have the hold off, then you might try using pause and/or draw...

Matlab App Designer: Update plot during loop in a function

Assuming that your plot function is part of the while loop and you have the hold off, then you might try using pause and/or draw...

ungefär ett år ago | 1

| accepted

Answered

Adding values of Columns in a matrix to create another matrix (for loop)

Anna, if you are trying to multiple two 1x25 vectors element-wise then try using a period in front of the multiplication operato...

Adding values of Columns in a matrix to create another matrix (for loop)

Anna, if you are trying to multiple two 1x25 vectors element-wise then try using a period in front of the multiplication operato...

ungefär ett år ago | 0

Answered

How can I find the average of certain rows in a column depending on the value of another column?

I may not completely understand the problem statement or the splitapply function, but it does not appear that the solution provi...

How can I find the average of certain rows in a column depending on the value of another column?

I may not completely understand the problem statement or the splitapply function, but it does not appear that the solution provi...

ungefär ett år ago | 0

Answered

Conditional mean for a matrix (calculate the mean ignoring the negative numbers)

Use something similar to the below example A = [-1, 2, 4 3,-1, 5 -1, 3, 4]; mean(A(A>=0))

Conditional mean for a matrix (calculate the mean ignoring the negative numbers)

Use something similar to the below example A = [-1, 2, 4 3,-1, 5 -1, 3, 4]; mean(A(A>=0))

ungefär ett år ago | 0

| accepted