답변 있음

Cell array data to double conversion

Assuming each cell has only one entry, try using cellfun with str2double to convert the cell array of strings to a cell array of...

Cell array data to double conversion

Assuming each cell has only one entry, try using cellfun with str2double to convert the cell array of strings to a cell array of...

5달 전 | 0

| 수락됨

해결됨

Find the peak 3n+1 sequence value

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

5달 전

해결됨

Read a column of numbers and interpolate missing data

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

5달 전

해결됨

Get the area codes from a list of phone numbers

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-6...

5달 전

답변 있음

i keep getting an error in my code about my array. pls help . code and error below thank you

When you are concatenating horizontally, the number of rows must be consistent. According to your comment, all variables are 1x...

i keep getting an error in my code about my array. pls help . code and error below thank you

When you are concatenating horizontally, the number of rows must be consistent. According to your comment, all variables are 1x...

5달 전 | 0

해결됨

Return unique values without sorting

If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

5달 전

해결됨

Try 1.5.4: Celsius to Fahrenheit

Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

5달 전

해결됨

Fibonacci Decomposition

Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

5달 전

답변 있음

Need for explication of this code

"i" starts with 1. M becomes [V(1:(1+3))] = [1:4] = [1 2 3 4]. "i" becomes 5 = (1+J) = (1+4). M adds a row with [5 6 7 8]. Et...

Need for explication of this code

"i" starts with 1. M becomes [V(1:(1+3))] = [1:4] = [1 2 3 4]. "i" becomes 5 = (1+J) = (1+4). M adds a row with [5 6 7 8]. Et...

5달 전 | 1

| 수락됨

답변 있음

How to create a GUI with changing buttons?

Another possibility is to use the same set of buttons for both options, but assign associated properties (String label) within t...

How to create a GUI with changing buttons?

Another possibility is to use the same set of buttons for both options, but assign associated properties (String label) within t...

6달 전 | 0

해결됨

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

6달 전

해결됨

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

6달 전

답변 있음

I can not modify data in a table

Have you considered using appdata instead of guidata? In this matlab answer (Appdata answer with link), there is a link to a gr...

I can not modify data in a table

Have you considered using appdata instead of guidata? In this matlab answer (Appdata answer with link), there is a link to a gr...

6달 전 | 0

해결됨

Remove the two elements next to NaN value

The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

6달 전

해결됨

Create a "+" flag

Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

6달 전

답변 있음

Script for deleting extra rows

Try this to remove rows with blank Depths: [~,~,dataIn] = xlsread(fileName, worksheetName); index = ~cellfun(@isempty, dataIn(...

Script for deleting extra rows

Try this to remove rows with blank Depths: [~,~,dataIn] = xlsread(fileName, worksheetName); index = ~cellfun(@isempty, dataIn(...

6달 전 | 0

| 수락됨

해결됨

How many Fibonacci numbers?

Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

6달 전

해결됨

Number of Even Elements in Fibonacci Sequence

Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

6달 전

해결됨

Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

6달 전

해결됨

Getting the indices from a matrice

Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

6달 전

해결됨

First non-zero element in each column

For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

6달 전

해결됨

Replicate elements in vectors

Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

6달 전

답변 있음

Error with xlswrite (error 0x800A03EC)

Try xlsprotect from File Exchange. https://www.mathworks.com/matlabcentral/fileexchange/6046-xlsprotect It has worked well for...

Error with xlswrite (error 0x800A03EC)

Try xlsprotect from File Exchange. https://www.mathworks.com/matlabcentral/fileexchange/6046-xlsprotect It has worked well for...

6달 전 | 0

답변 있음

2019b installation problem

I had this same problem with 2018b and now again with 2019b. Last year, Matlab Support solved it with the following solution: ...

2019b installation problem

I had this same problem with 2018b and now again with 2019b. Last year, Matlab Support solved it with the following solution: ...

7달 전 | 18

해결됨

Fill a zeros matrix

The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

7달 전

해결됨

Generate N equally spaced intervals between -L and L

Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

7달 전

해결됨

intersection of matrices

Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

7달 전

해결됨

We love vectorized solutions. Problem 1 : remove the row average.

Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

7달 전

해결됨

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

7달 전