Answered

rearranging textfile that contains commas

There is probably an easier way of doing this... but this should work: a = fileread('example.txt'); % txt file that you share...

rearranging textfile that contains commas

There is probably an easier way of doing this... but this should work: a = fileread('example.txt'); % txt file that you share...

8 maanden ago | 0

Answered

Extracting numerical results from a text file at different positions

good catch, my bad:) it was late at night. This should work. In either case if you are learning MATLAB, regexp are very powerful...

Extracting numerical results from a text file at different positions

good catch, my bad:) it was late at night. This should work. In either case if you are learning MATLAB, regexp are very powerful...

8 maanden ago | 0

| accepted

Answered

Extracting numerical results from a text file at different positions

There is probably an easier way to do this... but this should help. (I am using R2018b). a = fileread('0295_PhD_AB~Analysis...

Extracting numerical results from a text file at different positions

There is probably an easier way to do this... but this should help. (I am using R2018b). a = fileread('0295_PhD_AB~Analysis...

8 maanden ago | 1

Answered

Compiling excel files from subfiles

There might be a more elegant way than what I am proposing but this should work: ds = spreadsheetDatastore(pwd,'IncludeSubfol...

Compiling excel files from subfiles

There might be a more elegant way than what I am proposing but this should work: ds = spreadsheetDatastore(pwd,'IncludeSubfol...

9 maanden ago | 0

| accepted

Answered

Compiling excel files from subfiles

Try the following: ds = spreadsheetDatastore(pwd,'IncludeSubfolders',true) where pwd is the root folder.

Compiling excel files from subfiles

Try the following: ds = spreadsheetDatastore(pwd,'IncludeSubfolders',true) where pwd is the root folder.

9 maanden ago | 0

Answered

Compiling excel files from subfiles

Hi Jen , I am using R2018b, and there is a wonderful datatype: datastore which does this for you. A variation of it is the sp...

Compiling excel files from subfiles

Hi Jen , I am using R2018b, and there is a wonderful datatype: datastore which does this for you. A variation of it is the sp...

9 maanden ago | 0

Answered

How to convert csv file containing MAC addresses to JSON array

I did the following: Used Import Wizard, generated the script belo I am on R2018b, so I used the function jsonencode at the en...

How to convert csv file containing MAC addresses to JSON array

I did the following: Used Import Wizard, generated the script belo I am on R2018b, so I used the function jsonencode at the en...

10 maanden ago | 0

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

11 maanden ago

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

11 maanden ago

Solved

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

11 maanden ago

Problem

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

11 maanden ago | 0

Solved

Getting logical indexes

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

11 maanden ago

Solved

Matrix indexing with two vectors of indices

Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

11 maanden ago

Solved

middleAsColumn: Return all but first and last element as a column vector

Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

11 maanden ago

Solved

Return elements unique to either input

Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

11 maanden ago

Solved

"Low : High - Low : High - Turn around " -- Create a subindices vector

Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

11 maanden ago

Solved

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

11 maanden ago

Solved

Specific Element Count

Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

11 maanden ago

Solved

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

11 maanden ago

Solved

Find the largest value in the 3D matrix

Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

11 maanden ago

Solved

Guess Cipher

Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

11 maanden ago

Answered

how to fix too many output argument?

Dear Ma.Cathyrine Ravina, There are several ways of doing this: Use a Live Script (with control slider bar) Create a MATLA...

how to fix too many output argument?

Dear Ma.Cathyrine Ravina, There are several ways of doing this: Use a Live Script (with control slider bar) Create a MATLA...

11 maanden ago | 0

| accepted

Answered

How to find separate graphs

Ro=[0 0 0 1 0 0; 0 0 1 0 1 0; 0 0 0 0 0 0; 0 0 ...

How to find separate graphs

Ro=[0 0 0 1 0 0; 0 0 1 0 1 0; 0 0 0 0 0 0; 0 0 ...

11 maanden ago | 0

| accepted

Answered

if NaN then...

Have you tried using the function isnan? https://nl.mathworks.com/help/matlab/ref/isnan.html?searchHighlight=isnan&s_tid=doc_sr...

if NaN then...

Have you tried using the function isnan? https://nl.mathworks.com/help/matlab/ref/isnan.html?searchHighlight=isnan&s_tid=doc_sr...

11 maanden ago | 3

Answered

How to insert code segments from another MATLAB file?

There usually are 3 ways that I have seen people do this. in your func.m add a comment with a special TAG (e.g. %#mycode), th...

How to insert code segments from another MATLAB file?

There usually are 3 ways that I have seen people do this. in your func.m add a comment with a special TAG (e.g. %#mycode), th...

11 maanden ago | 1

| accepted

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

11 maanden ago

Solved

Swap the first and last columns

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

11 maanden ago

Answered

Retrieve data from several folders and structures

If I understand correctly you have data files in different folders and you want to take subset of that data and reorganize it in...

Retrieve data from several folders and structures

If I understand correctly you have data files in different folders and you want to take subset of that data and reorganize it in...

11 maanden ago | 0

| accepted

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

11 maanden ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

11 maanden ago