Answered

How to make a curve smooth in spline block

If you want to approximate a set of points by a smooth curve you need a *smoothing spline*, not just a *spline*. Moreover, in yo...

How to make a curve smooth in spline block

If you want to approximate a set of points by a smooth curve you need a *smoothing spline*, not just a *spline*. Moreover, in yo...

más de 4 años ago | 0

Answered

Discard elements from structure array

There is a specific function to remove a field from a structure: <https://it.mathworks.com/help/matlab/ref/rmfield.html rmfield>...

Discard elements from structure array

There is a specific function to remove a field from a structure: <https://it.mathworks.com/help/matlab/ref/rmfield.html rmfield>...

más de 4 años ago | 0

Answered

Display values with fprintf

Here it is ret = 0.000065003; std = 0.0207; fprintf('The return is %.4e and the standard deviation is %.4f \n',ret,st...

Display values with fprintf

Here it is ret = 0.000065003; std = 0.0207; fprintf('The return is %.4e and the standard deviation is %.4f \n',ret,st...

más de 4 años ago | 1

Answered

How do I integrate this set of matrix data points

You just need one |for| loop as |trapz| operates also on matrices. This is the piece of code: A = rand(32); B = zeros(32...

How do I integrate this set of matrix data points

You just need one |for| loop as |trapz| operates also on matrices. This is the piece of code: A = rand(32); B = zeros(32...

más de 4 años ago | 0

| accepted

Answered

Multiple .txt input files

Use |dir| function to list files with .txt extension %list folder files files = dir('*.txt'); and put your code in...

Multiple .txt input files

Use |dir| function to list files with .txt extension %list folder files files = dir('*.txt'); and put your code in...

más de 4 años ago | 1

| accepted

Answered

Cross correlation Between two matrices row by row

There are some issues in your code. # |crosscorr| function requires two vector inputs. |Ain01_correct(i,2)| it is not (it is ...

Cross correlation Between two matrices row by row

There are some issues in your code. # |crosscorr| function requires two vector inputs. |Ain01_correct(i,2)| it is not (it is ...

más de 4 años ago | 0

| accepted

Answered

Please help me in generating a random string(row vector) in which each element has a different upper bound.

The useful way is U = [2,3,4,5,7]; A = arrayfun( @(x) randi([0,x]) , U ) but, if upper-bounds are 1-digit numbers, y...

Please help me in generating a random string(row vector) in which each element has a different upper bound.

The useful way is U = [2,3,4,5,7]; A = arrayfun( @(x) randi([0,x]) , U ) but, if upper-bounds are 1-digit numbers, y...

más de 4 años ago | 0

| accepted

Answered

How to display and delete different line in graph when checkbox check and uncheck

Yuo may find it useful reading these tutorials <https://it.mathworks.com/help/matlab/creating_guis/about-the-simple-guide-gui-ex...

How to display and delete different line in graph when checkbox check and uncheck

Yuo may find it useful reading these tutorials <https://it.mathworks.com/help/matlab/creating_guis/about-the-simple-guide-gui-ex...

más de 4 años ago | 0

Answered

Error: Undefined function <func_name> for input arguments of type 'double'.

Refer to your 2nd line of code fhd = str2func('f1'); The string |'f1'| evaluates to nothing in Matlab, therefore the com...

Error: Undefined function <func_name> for input arguments of type 'double'.

Refer to your 2nd line of code fhd = str2func('f1'); The string |'f1'| evaluates to nothing in Matlab, therefore the com...

más de 4 años ago | 0

Answered

How do i represent a set of clusters points in scatter plot?

Hi, what you need is exactly Matlab <https://it.mathworks.com/help/stats/gscatter.html GSCATTER> function. Check out the help pa...

How do i represent a set of clusters points in scatter plot?

Hi, what you need is exactly Matlab <https://it.mathworks.com/help/stats/gscatter.html GSCATTER> function. Check out the help pa...

más de 4 años ago | 0

| accepted

Answered

How to plot a mean value as a function of specific value pairs ?

First, notice that in Matlab |a=[ [1 2], [2 3], [4 5] ]| equals |a=[1,2,2,3,4,5]|. I guess, you meant to associate each entry of...

How to plot a mean value as a function of specific value pairs ?

First, notice that in Matlab |a=[ [1 2], [2 3], [4 5] ]| equals |a=[1,2,2,3,4,5]|. I guess, you meant to associate each entry of...

más de 4 años ago | 0

Answered

Binary file reader using fread function

The |fread| function read data in binary format, thus sequences of 0s and 1s. Therefore, you can read raw data just as a sequenc...

Binary file reader using fread function

The |fread| function read data in binary format, thus sequences of 0s and 1s. Therefore, you can read raw data just as a sequenc...

más de 4 años ago | 1

Answered

How to plot a function file

Check out the |stairs| function <https://it.mathworks.com/help/matlab/ref/stairs.html>

How to plot a function file

Check out the |stairs| function <https://it.mathworks.com/help/matlab/ref/stairs.html>

más de 4 años ago | 0

Answered

Why is probplot not plotting the reference line for one matrix column?

The problem is not due to -0 (which is the same as 0). It seems that your data in the first column are not even close to be Gaus...

Why is probplot not plotting the reference line for one matrix column?

The problem is not due to -0 (which is the same as 0). It seems that your data in the first column are not even close to be Gaus...

más de 4 años ago | 1

Answered

3D surface plot from for loop

Most probably you don't want to plot a surface, instead a plot of a line in a 3D space. Try this: plot3(ang,Lp,d); grid on;...

3D surface plot from for loop

Most probably you don't want to plot a surface, instead a plot of a line in a 3D space. Try this: plot3(ang,Lp,d); grid on;...

más de 4 años ago | 0

Answered

How to detect & remove steps from signal?

Differentiate your signal (function |diff| in Matlab). The steps are located at points where first derivative is very high. Once...

How to detect & remove steps from signal?

Differentiate your signal (function |diff| in Matlab). The steps are located at points where first derivative is very high. Once...

más de 4 años ago | 0

| accepted

Solved

Use a timetable to analyze a train timetable (Part 5)

You are analyzing a train timetable (you have some time to kill since you just missed your train!) How many trains depart each d...

más de 4 años ago

Solved

Use a timetable to analyze a train timetable (Part 4)

You are analyzing a train timetable (you have some time to kill since you just missed your train!) What is the average daily tri...

más de 4 años ago

Solved

Use a timetable to analyze a train timetable (Part 3)

Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston ...

más de 4 años ago

Solved

Use a timetable to analyze a train timetable (Part 2)

Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Yo...

más de 4 años ago

Solved

Use a timetable to analyze a train timetable (Part 1)

Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Th...

más de 4 años ago

Solved

When Was That Goal Scored?

We want to find out when the goals were scored in a particular soccer game. For each game, we are given a "Goal Event Data" XML ...

más de 4 años ago

Solved

Words Count: A Cell Array Approach

Given an input character vector consisting of words, punctuation marks, white spaces, and possibly newline characters (\n), arra...

más de 4 años ago

Solved

String Array Basics, Part 4: Convert String Array with Missing Values to Cell Array

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

más de 4 años ago

Solved

String Array Basics, Part 2: Convert String Array to Cell Array; No Missing Values

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

más de 4 años ago

Solved

String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values

<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

más de 4 años ago

Solved

Use R2016b Text Manipulations to Fix These Addresses (Part 3)

We have a series of addresses like the following which we'd like to reformat. Each of the addresses lacks a space and a comma ...

más de 4 años ago

Solved

Use R2016b Text Manipulations to Fix These Addresses (Part 1)

We have a series of addresses like the following which we'd like to reformat. Can you remove the latitude and longitude from the...

más de 4 años ago

Solved

Use R2016b Text Manipulations to Fix These Addresses (Part 2)

We have a series of addresses like the following which we'd like to reformat. All the addresses are in the Boston area of Mass...

más de 4 años ago

Solved

Combine the first and last names

MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...

más de 4 años ago