Answered

find max value of structure

If I'm understanding correctly, you have a struct array, s, of size 1x30, with a single field (let's call it x). Something like...

find max value of structure

If I'm understanding correctly, you have a struct array, s, of size 1x30, with a single field (let's call it x). Something like...

19 days ago | 0

Solved

Word Counting and Indexing

You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

1 month ago

Solved

Test for balanced parentheses

Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

1 month ago

Solved

Flip the vector from right to left

Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

1 month ago

Solved

Whether the input is vector?

Given the input x, return 1 if x is vector or else 0.

1 month ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

1 month ago

Answered

Derivative from ode45

Generally I send the result of ode45 back through my function as a post-processing step. [t,x] = ode45(@myDerivFcn,tspan,x0) ...

Derivative from ode45

Generally I send the result of ode45 back through my function as a post-processing step. [t,x] = ode45(@myDerivFcn,tspan,x0) ...

1 month ago | 0

Answered

How to solve two differential equations simultaneously with one having a matrix form of initial condition?

Hi Adham, Just to be clear, it's an ordinary differential equation, is /? If so, and each matrix term is separable, then you ...

How to solve two differential equations simultaneously with one having a matrix form of initial condition?

Hi Adham, Just to be clear, it's an ordinary differential equation, is /? If so, and each matrix term is separable, then you ...

1 month ago | 0

| accepted

Answered

Problem with xlim when having date

Hi Behzad, xlim sets the absolute max and min of the graph that you're looking at. To set the interval for grid lines, use the ...

Problem with xlim when having date

Hi Behzad, xlim sets the absolute max and min of the graph that you're looking at. To set the interval for grid lines, use the ...

1 month ago | 1

| accepted

Answered

Running ode45 from problem statement

Hi Daniel, For your problem, you were very close and had the solutions to each equation worked out correctly. The function sign...

Running ode45 from problem statement

Hi Daniel, For your problem, you were very close and had the solutions to each equation worked out correctly. The function sign...

1 month ago | 1

| accepted

Answered

please help me, how do I make the code for the equation in the following picture?

You can't code an infinite sum exactly, but fortunately, this one is bounded (x^2 on the denominator and the numerator is bounde...

please help me, how do I make the code for the equation in the following picture?

You can't code an infinite sum exactly, but fortunately, this one is bounded (x^2 on the denominator and the numerator is bounde...

1 month ago | 0

Answered

Sort data based on different column

Try using the sortrows command in conjunction with a transpose. Apply it once to exploit column sorts (e.g. Column 1 is Row 1 ab...

Sort data based on different column

Try using the sortrows command in conjunction with a transpose. Apply it once to exploit column sorts (e.g. Column 1 is Row 1 ab...

2 months ago | 0

| accepted

Answered

Mimicking the font that title() uses when calling it with latex interpreter

Try using the Tex interpreter with the \bf switch? title('\bf\nabla TITLE','Interpreter','tex') seems to get the bold you're lo...

Mimicking the font that title() uses when calling it with latex interpreter

Try using the Tex interpreter with the \bf switch? title('\bf\nabla TITLE','Interpreter','tex') seems to get the bold you're lo...

2 months ago | 0

Solved

Renaming a field in a structure array

MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

2 months ago

Solved

Get the length of a given vector

Given a vector x, the output y should equal the length of x.

2 months ago

Solved

Vector creation

Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

2 months ago

Answered

How can I find correlation between two variables X & Y which I have obtained experimentally?

Three points will give you a line, but I'd be hesitant to call it a trend. In general, linear regression of X and Y gives you a ...

How can I find correlation between two variables X & Y which I have obtained experimentally?

Three points will give you a line, but I'd be hesitant to call it a trend. In general, linear regression of X and Y gives you a ...

2 months ago | 1

Answered

Evaluating function handle with array input arguments

Are you specifically looking at a binomial expansion? If so, there's a trick for composing that. For a generalized "raise this ...

Evaluating function handle with array input arguments

Are you specifically looking at a binomial expansion? If so, there's a trick for composing that. For a generalized "raise this ...

2 months ago | 1

Answered

Combine graphs from different script (directory)

Like you thought, the cleanest process is to write a 5th script which will do as you've written above. If the code is easily con...

Combine graphs from different script (directory)

Like you thought, the cleanest process is to write a 5th script which will do as you've written above. If the code is easily con...

2 months ago | 0

Answered

Running/testing scripts on multiple Matlab/Simulink versions?

MATLAB can run in a headless mode from the command line, where it can take a script to execute. It's been a while since I've don...

Running/testing scripts on multiple Matlab/Simulink versions?

MATLAB can run in a headless mode from the command line, where it can take a script to execute. It's been a while since I've don...

2 months ago | 0

| accepted

Answered

How to read and arrange certain data in multiple text file?

This seems like a good opportunity to leverage MATLAB's table datatype: https://www.mathworks.com/help/matlab/ref/table.html U...

How to read and arrange certain data in multiple text file?

This seems like a good opportunity to leverage MATLAB's table datatype: https://www.mathworks.com/help/matlab/ref/table.html U...

2 months ago | 0

Answered

Where can I find syntax related with 'Simulink.Parameter', 'Simulink.Signal' and 'Simulink.CoderInfo'

Check the documentation page: https://www.mathworks.com/help/simulink/slref/parameter.html Simulink Parameters function a litt...

Where can I find syntax related with 'Simulink.Parameter', 'Simulink.Signal' and 'Simulink.CoderInfo'

Check the documentation page: https://www.mathworks.com/help/simulink/slref/parameter.html Simulink Parameters function a litt...

2 months ago | 1

| accepted

Answered

Passing variables in GUI vs. assignin then evalin

Nested Functions are your favorite friend when working with GUIs. Place the callbacks within the main UI, and they'll be able to...

Passing variables in GUI vs. assignin then evalin

Nested Functions are your favorite friend when working with GUIs. Place the callbacks within the main UI, and they'll be able to...

2 months ago | 0

Answered

Trouble creating function out of variable in terms of x

Is there any particular reason it needs to be using symbolic math? MATLAB has a built-in polynomial evaluation function called ...

Trouble creating function out of variable in terms of x

Is there any particular reason it needs to be using symbolic math? MATLAB has a built-in polynomial evaluation function called ...

2 months ago | 0

Answered

How to make Ellipse rotates around focus

Haoang, Are you looking to have the ellipse rotate in a plot? You might be interested in applying a rotation matrix. See: ht...

How to make Ellipse rotates around focus

Haoang, Are you looking to have the ellipse rotate in a plot? You might be interested in applying a rotation matrix. See: ht...

2 months ago | 0

Answered

Matlab Plotting with out legend

Check out the textbox() or annotation() commands. Text objects are placed inside the plot, while annotations are placed on the f...

Matlab Plotting with out legend

Check out the textbox() or annotation() commands. Text objects are placed inside the plot, while annotations are placed on the f...

5 months ago | 0