Answered

how to store multpile files which has been loaded first in the same script ,in the new variable , through loop

So, I believe this answer could be done using the eval function but since that function is highly discouraged here is my attempt...

how to store multpile files which has been loaded first in the same script ,in the new variable , through loop

So, I believe this answer could be done using the eval function but since that function is highly discouraged here is my attempt...

6 months ago | 0

Answered

Why are spaces ignored when a character string is scanned?

This is because of the way fscanf reads it in. If you go to the linked documentation and scroll down to Character Fields, it not...

Why are spaces ignored when a character string is scanned?

This is because of the way fscanf reads it in. If you go to the linked documentation and scroll down to Character Fields, it not...

6 months ago | 0

Answered

How many years to double initial investment with various interest rates

If I understand the equation you posted correctly lets walk through this. S = total amount after n years if P was initially inve...

How many years to double initial investment with various interest rates

If I understand the equation you posted correctly lets walk through this. S = total amount after n years if P was initially inve...

6 months ago | 0

Answered

Generating a grid around circles in an image

So I felt like making it interactive so I used the built in guide function in matlab to create a GUI. Attached are the two files...

Generating a grid around circles in an image

So I felt like making it interactive so I used the built in guide function in matlab to create a GUI. Attached are the two files...

6 months ago | 1

| accepted

Answered

What sort of a filter/method can be applied to smoothen sharp peaks on a surface?

In general, if you want to smooth out peaks you want to get rid of the high frequency content, aka a low pass filter. The easies...

What sort of a filter/method can be applied to smoothen sharp peaks on a surface?

In general, if you want to smooth out peaks you want to get rid of the high frequency content, aka a low pass filter. The easies...

6 months ago | 0

Answered

How to plot for different values of parameters on one run?

Matlab actually has a page on this called Parameterizing Functions. Using one of the options for that I believe this will do i...

How to plot for different values of parameters on one run?

Matlab actually has a page on this called Parameterizing Functions. Using one of the options for that I believe this will do i...

6 months ago | 0

| accepted

Answered

How to create an animated plot of a temperature data with holding on each year?

Alright lets see how much I can help with. First off to gradient between colors I have a little way down below. I get the rgb ...

How to create an animated plot of a temperature data with holding on each year?

Alright lets see how much I can help with. First off to gradient between colors I have a little way down below. I get the rgb ...

6 months ago | 1

| accepted

Answered

can someone please help me to find out mistake

Here you go. A few things needed to be changed. First the change that Torsten initially pointed out. Then we further change it t...

can someone please help me to find out mistake

Here you go. A few things needed to be changed. First the change that Torsten initially pointed out. Then we further change it t...

6 months ago | 0

Answered

storing output of for loop

I believe your goal can be more easily solved using the built in Matlab function reshape. It looks to me like you have a 1x30000...

storing output of for loop

I believe your goal can be more easily solved using the built in Matlab function reshape. It looks to me like you have a 1x30000...

6 months ago | 0

| accepted

Answered

Is it possible to run a function that requires input variables when they are declared later in the function?

It looks to me that the main problem is that you are using the first function wrong. When you define the function function [ar...

Is it possible to run a function that requires input variables when they are declared later in the function?

It looks to me that the main problem is that you are using the first function wrong. When you define the function function [ar...

6 months ago | 0

| accepted

Answered

Log Simulink simulation data to structure element

The way that I would do it is this. In your main simulink model, right click anywhere go to ModelProperties -> Callbacks -> Stop...

Log Simulink simulation data to structure element

The way that I would do it is this. In your main simulink model, right click anywhere go to ModelProperties -> Callbacks -> Stop...

6 months ago | 1

| accepted

Answered

different titles for animation

I would suggest creating the title like this: months = {'Jan', 'Feb', ...}; years = num2str((1979:2018)'); for i = 1:40 ...

different titles for animation

I would suggest creating the title like this: months = {'Jan', 'Feb', ...}; years = num2str((1979:2018)'); for i = 1:40 ...

6 months ago | 1

| accepted

Answered

how to save the index during for loop?

A couple different things can fix this, but I would suggest this one just creating the variable a again after your for loop -> ...

how to save the index during for loop?

A couple different things can fix this, but I would suggest this one just creating the variable a again after your for loop -> ...

6 months ago | 0

Answered

how to solve Index exceeds the number of array elements (1).

What this error is saying is that at some point in that line you are exceeding the number of elements in an array. The (1) is in...

how to solve Index exceeds the number of array elements (1).

What this error is saying is that at some point in that line you are exceeding the number of elements in an array. The (1) is in...

6 months ago | 0

| accepted

Answered

How to display the two biggest blobs in terms of area?

In the line biggestBlob=ismember(labeledImage,indexOfBiggest(1)); you are finding the biggest by looking at the first index i...

How to display the two biggest blobs in terms of area?

In the line biggestBlob=ismember(labeledImage,indexOfBiggest(1)); you are finding the biggest by looking at the first index i...

6 months ago | 1

| accepted

Answered

Changing colors in a stacked bar graph to specific ones?

In order to figure out how that code works I'd suggest first adding a pause(1) before the end of the for loop. This way you can ...

Changing colors in a stacked bar graph to specific ones?

In order to figure out how that code works I'd suggest first adding a pause(1) before the end of the for loop. This way you can ...

6 months ago | 0

Answered

How to convert a continuous figure to discrete?

A couple different ways to do this. When plotting discrete values it is often preferred to use stem instead of plot. It does not...

How to convert a continuous figure to discrete?

A couple different ways to do this. When plotting discrete values it is often preferred to use stem instead of plot. It does not...

6 months ago | 0

| accepted

Answered

Adding columns to tables

Check out https://www.mathworks.com/help/matlab/matlab_prog/add-and-delete-table-variables.html if you have not. It has many wa...

Adding columns to tables

Check out https://www.mathworks.com/help/matlab/matlab_prog/add-and-delete-table-variables.html if you have not. It has many wa...

6 months ago | 0

Answered

Merge up sweep and down sweep together in the same figure to get a chirp up and down

It seems like everything you've done so far is good. To merge two matrices you can use this simple command: chirp = [Tx1 Tx2]; ...

Merge up sweep and down sweep together in the same figure to get a chirp up and down

It seems like everything you've done so far is good. To merge two matrices you can use this simple command: chirp = [Tx1 Tx2]; ...

6 months ago | 0

| accepted

Answered

Controlling a generic engine block

It sounds like you want a very binary controller. If a velocity is larger than a threshold do one thing, if not do another. If t...

Controlling a generic engine block

It sounds like you want a very binary controller. If a velocity is larger than a threshold do one thing, if not do another. If t...

6 months ago | 0

Answered

how to check every single element in a matrix vector wise

A matrix is indexed like this: A(row,column). So to traverse a single column you leave the second value the same while changing ...

how to check every single element in a matrix vector wise

A matrix is indexed like this: A(row,column). So to traverse a single column you leave the second value the same while changing ...

6 months ago | 0

| accepted

Answered

Figure box does not show data when using plot(x,y)

The reason is that you are trying to create a plot with a single data point multiple times. So each time you plot there are not ...

Figure box does not show data when using plot(x,y)

The reason is that you are trying to create a plot with a single data point multiple times. So each time you plot there are not ...

6 months ago | 0

| accepted

Answered

How can I find the best parameter values to minimize a function

If you do not really care about efficiency and time you can just loop through and try everything yourself. fftlen = [512 1024 2...

How can I find the best parameter values to minimize a function

If you do not really care about efficiency and time you can just loop through and try everything yourself. fftlen = [512 1024 2...

6 months ago | 0

| accepted

Answered

Real Time Data Store in Inf Array

If I understand correctly what you want and a guess at how you are formatting it. Pointer = 1; window = sizeFilter % However ...

Real Time Data Store in Inf Array

If I understand correctly what you want and a guess at how you are formatting it. Pointer = 1; window = sizeFilter % However ...

6 months ago | 0

Answered

Resampling audio file to first 10 sec of each minute

There are many ways to do this depending on what exactly it is you want to do and how you want to do it. If you have already imp...

Resampling audio file to first 10 sec of each minute

There are many ways to do this depending on what exactly it is you want to do and how you want to do it. If you have already imp...

6 months ago | 0

Answered

Obtain z-values in contour plot using x,y coordinates of a point of interest

You could potentially use the interp2 function. If you used Contour(X,Y,Z); you could then use interp2(X,Y,Z,Xq,Yq); to obt...

Obtain z-values in contour plot using x,y coordinates of a point of interest

You could potentially use the interp2 function. If you used Contour(X,Y,Z); you could then use interp2(X,Y,Z,Xq,Yq); to obt...

6 months ago | 1