Community Profile

photo

Jon


Last seen: Today Active since 2013

Statistics

  • 6 Month Streak
  • Knowledgeable Level 4
  • Pro
  • Revival Level 1
  • First Review
  • Thankful Level 2
  • First Answer

View badges

Content Feed

View by

Answered
if statement is not working
The problem is that your if statement will only be true if all of the elements of theta satisfy the condition. If you only want...

9 hours ago | 1

Answered
Merge columns in two tables depending on column names
I think you can probably accomplish what you want using one or more of MATLAB's join, innerjoin, and outerjoin commands. Please...

11 hours ago | 0

Answered
i am trying to write a program to find the day of any date.
I think MATLAB's weekday function should do this for you, type doc weekday on the command line for details

1 day ago | 0

Answered
ODE solvers and code
Just edit the functions, so type on the command line for example: edit ode45

1 day ago | 0

Answered
How to create a Stereo Sweep from Frequency A to B in a given time?
As an alternative, if you don't have the signal processing toolbox, or for some reason preferred to see the details you could do...

2 days ago | 2

Answered
Identifying the first number in a series in the same vector?
define your vector as x then y = unique(floor(x)) floor gets rid of the decimal part, unique gets rid of the repetitions

2 days ago | 0

| accepted

Answered
Different legends for multiple graphs
There might be more elegant ways of generating the legends but one approach would be to define before the loop a cell array of l...

2 days ago | 0

| accepted

Answered
Warning: Imaginary parts of complex X and/or Y arguments ignored.
Haven't tried your code, but most likely one or more of h1, h2, or h3 are negative and when you take the square root of them it...

3 days ago | 0

| accepted

Answered
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side
Following up on @Walter Roberson's comment, I ran your code (I assigned my own values to data, as I didn't have your input file...

5 days ago | 1

| accepted

Answered
how to find the value of the diagnol of the attached image
From your matlab.mat file it seems that you are showing the image represented by the matrix corr_data. You can get the diagonal...

5 days ago | 0

Answered
Add data from one input file to another
I think you should be able to get the sets of data that you want using MATLAB's ismember and intersect Is that what you are ask...

5 days ago | 0

Answered
How to solve for x give the equation of a circle and the equation of a line?
You can use MATLAB's fsolve to solve the original system of two equations and two unknowns. To do this you have to rearrange the...

5 days ago | 0

Answered
How and what is the time period of following function
I think you are looking for a characteristic time duration for your circuit. One common criteria is the settling time following ...

6 days ago | 0

Answered
How do I make Matlab not show large values in scientific notation?
I think typing this command on the command line may get you what you want format shortG

6 days ago | 0

| accepted

Answered
interpolate data in timeseries
Although you say you have a "time series" it looks like v is just an ordinary vector. Assuming you have another "t" vector to go...

6 days ago | 0

Answered
How to get the equation inside that of root(function,z) equation ,i.e the function only
This is a polynomial, you should be able to obtain all of the roots (real and complex) using: r = roots([1.0 ... -(190266...

7 days ago | 0

Answered
I have to combine 90 txt files in one txt file
If you don't want to create a huge matrix before writing it out you could do this % define some parameters outfile = 'alldata....

7 days ago | 1

| accepted

Answered
I am trying to write data to a file where the first column is the time values and the second column is the volts values.
I think the problem is tha fprintf writes the elements columnwise. You could send the transpose (use the ' operator) fprintf(fi...

7 days ago | 0

| accepted

Answered
create a graph with a specific interval
If you want n to have integer values greater than zero and strictly less than 35 you can define n = 0:34 If you don't require ...

8 days ago | 1

Answered
why do I suddenly get a gain value in my transfer function?
Your original expression and the one found by zpk are the same. zpk just factored out the 2 from denominator.

8 days ago | 1

| accepted

Answered
How to solve for N sets of 2 equations and 2 unknowns using a for loop?
This is one approach using nested functions to pass additional paramaters, see https://www.mathworks.com/help/optim/ug/passing-e...

14 days ago | 0

| accepted

Answered
Convert from linear to log scale and back again
I think you can get what you want using MATLAB's semilogx function

15 days ago | 0

Answered
Is there a way to find the mean of every other number in a vector and compare it to every other number in another vector?
I'm not sure if I am clear on what you are trying to do but from your description I would do something like this: red = [2 4 3 ...

15 days ago | 1

Answered
Trying to combine multiple square matrices diagonally into a combined larger matrix
You can use MATLAB's blkdiag function for this so in your case T = blkdiag(A,B,C)

15 days ago | 0

Answered
intersect() returns unplausible values
I think you may be misunderstanding the usage of MATLAB's intersect function. It finds the set intersection (elements in common)...

16 days ago | 0

| accepted

Answered
how can i get value of y
It looks like you are trying to solve for the root of a nonlinear function. You can use MATLAB's fzero to do this. Type doc fzer...

16 days ago | 1

Answered
If point x belongs to vertices of rectangle?
You could define a 4 by 2 array, corners, with the corner values (first column x values, second column y values) then do somethi...

16 days ago | 0

| accepted

Answered
How to solve this error : "index out of bounds because numel(U)=1"
With your definition of U, U has only one element. Note you first assign a scalar (one element) variable u=1, then you assign U ...

17 days ago | 0

| accepted

Answered
3 Excel COLUMNS x,y,z imported into work space as vectors, z is a function of x,y how do i get the data into a 2d lookup table
Here is an example MATLAB script that you could run to assign the necessary variables in your base workspace before running yo...

17 days ago | 0

| accepted

Answered
How to adjust axes created using plot
use the ylim command for example g = @(x) sin(x)/x fplot(g, [-10, 10]) title('The result of fplot') ylim([-2,2])

20 days ago | 1

Load more