Risposto

Multiple Input/output function to excel

You can achieve this in many ways. The simplest way would be to just create arrays of your input ranges, for example in2=0:0.0...

Multiple Input/output function to excel

You can achieve this in many ways. The simplest way would be to just create arrays of your input ranges, for example in2=0:0.0...

oltre 4 anni fa | 1

Risposto

compiling Matlab files not clear

Hi farzad, It is definitely possible to compile an m file to a standalone exe file, for example in the form of a GUI / app. Whe...

compiling Matlab files not clear

Hi farzad, It is definitely possible to compile an m file to a standalone exe file, for example in the form of a GUI / app. Whe...

oltre 4 anni fa | 1

| accettato

Risposto

Can Matlab handle segmented graphs and automatic trendlines?

The answer to all four questions is yes. You can execute several plots in the same figure, as well as on the same axes (axes i...

Can Matlab handle segmented graphs and automatic trendlines?

The answer to all four questions is yes. You can execute several plots in the same figure, as well as on the same axes (axes i...

oltre 4 anni fa | 1

| accettato

Risposto

How to centre textboxes on the plot outline?

First, make a handle for your figure: ax=axes; plot(ax,t,x); Next, when you set the dimensions of your textbox, refer b...

How to centre textboxes on the plot outline?

First, make a handle for your figure: ax=axes; plot(ax,t,x); Next, when you set the dimensions of your textbox, refer b...

oltre 4 anni fa | 1

| accettato

Risposto

scalar vs nonscalar structure: advantages?

There are probably people out there much smarter than me, so take this with a grain of salt. If it were me, I would choose tha...

scalar vs nonscalar structure: advantages?

There are probably people out there much smarter than me, so take this with a grain of salt. If it were me, I would choose tha...

oltre 4 anni fa | 0

Risposto

How to combine multiple files into one .csv

If I run your code and pause it after the first execution of the for loop, the num variable is empty, so something might be up w...

How to combine multiple files into one .csv

If I run your code and pause it after the first execution of the for loop, the num variable is empty, so something might be up w...

oltre 4 anni fa | 0

| accettato

Risposto

How to plot multiple vertical lines at specific points on x axis?

By default, matlab replaces plots on an axes instead of adding. However, if you set hold on, it will add instead of replacing, l...

How to plot multiple vertical lines at specific points on x axis?

By default, matlab replaces plots on an axes instead of adding. However, if you set hold on, it will add instead of replacing, l...

oltre 4 anni fa | 0

Risposto

Legend position according to axes

You can specify the position of your legend yourself with coordinates, rather than using a predetermined location. First two coo...

Legend position according to axes

You can specify the position of your legend yourself with coordinates, rather than using a predetermined location. First two coo...

oltre 4 anni fa | 0

Risposto

Read out parameter values of a polynomial compensation curve.

myfit=fit(x,y,'poly3'); From there you can extract the coefficients as myfit.p1, myfit.p2 etc.

Read out parameter values of a polynomial compensation curve.

myfit=fit(x,y,'poly3'); From there you can extract the coefficients as myfit.p1, myfit.p2 etc.

oltre 4 anni fa | 0

| accettato

Risposto

Vectorized alterlative to identify duplicate elements in an array

Logical indexing for every instance, then convert the logical output to doubles and sum it (since you cant sum logicals), and fi...

Vectorized alterlative to identify duplicate elements in an array

Logical indexing for every instance, then convert the logical output to doubles and sum it (since you cant sum logicals), and fi...

oltre 4 anni fa | 0

Risposto

How to change Y-axis in subplots of Boxplot on the same figure

You need a reference back to each inidividual subplot. Right now, your subplot1 label is overwritten each time, so you can only ...

How to change Y-axis in subplots of Boxplot on the same figure

You need a reference back to each inidividual subplot. Right now, your subplot1 label is overwritten each time, so you can only ...

oltre 4 anni fa | 0

Risposto

Animating an m-file to show a rectangle filling up

I don't know what kind of animation you are looking for, but something quick and simple would be to insert a pause after every p...

Animating an m-file to show a rectangle filling up

I don't know what kind of animation you are looking for, but something quick and simple would be to insert a pause after every p...

oltre 4 anni fa | 0

Risposto

how to load multiple files and do the computation for each of them and write the output in consequent rows

Your loop will want to start with grabbing all files in a folder. uigetfile with the MultiSelect option will work wonders here: ...

how to load multiple files and do the computation for each of them and write the output in consequent rows

Your loop will want to start with grabbing all files in a folder. uigetfile with the MultiSelect option will work wonders here: ...

oltre 4 anni fa | 0

| accettato

Risposto

I need help with my While Loop!

Index them! Either as a structure, or an array with a 4th dimension. I personally favour structures, since 4D data makes my head...

I need help with my While Loop!

Index them! Either as a structure, or an array with a 4th dimension. I personally favour structures, since 4D data makes my head...

oltre 4 anni fa | 0

| accettato

Risposto

how to read images one by one from folder for operation using for loop

I like to use the multiselect function of uigetfile as an input to a for loop: [Names,Paths]=uigetfile({'*.img*'},'MultiSelect...

how to read images one by one from folder for operation using for loop

I like to use the multiselect function of uigetfile as an input to a for loop: [Names,Paths]=uigetfile({'*.img*'},'MultiSelect...

oltre 4 anni fa | 0

Risposto

data excel in matlab

You have an array dataExcel which has size(dataExcel,1) rows, and size(dataExcel,2) columns. The rows would correspond exactly t...

data excel in matlab

You have an array dataExcel which has size(dataExcel,1) rows, and size(dataExcel,2) columns. The rows would correspond exactly t...

oltre 4 anni fa | 0

| accettato

Risposto

Counting specific element in one column corresponding to unique elements in an another column

You can use logic indexing. Example: length(b(a==1 & b==-1)); You get those entries from b which fulfils the condition that t...

Counting specific element in one column corresponding to unique elements in an another column

You can use logic indexing. Example: length(b(a==1 & b==-1)); You get those entries from b which fulfils the condition that t...

oltre 4 anni fa | 0

| accettato

Risposto

Two x-axis for the same y-axis

You're on the right track with some of the stuff you have tabbed out. All you need is to set the x and y limits for your ax2 axe...

Two x-axis for the same y-axis

You're on the right track with some of the stuff you have tabbed out. All you need is to set the x and y limits for your ax2 axe...

oltre 4 anni fa | 0

| accettato

Risposto

Help in Developing Graph.

This is case specific, but what you want to do is define the 8 interesting points, and then simply plot them. The text is less s...

Help in Developing Graph.

This is case specific, but what you want to do is define the 8 interesting points, and then simply plot them. The text is less s...

oltre 4 anni fa | 0

Risposto

Finding corresponding term from a uitable

If I recall, strcmpi needs string arrays, character vectors or cell arrays of character vectors as inputs, whereas you give it a...

Finding corresponding term from a uitable

If I recall, strcmpi needs string arrays, character vectors or cell arrays of character vectors as inputs, whereas you give it a...

oltre 4 anni fa | 0

Risposto

Write table with UIPUT file

Try typing this bit in the command window: >> '(pname,fname)' ans = '(pname,fname)' So your path is a string named (pna...

Write table with UIPUT file

Try typing this bit in the command window: >> '(pname,fname)' ans = '(pname,fname)' So your path is a string named (pna...

oltre 4 anni fa | 0

Risposto

How can I splitt up a big matrix into smaller matrises, splitting it up by values on the x-axis

Logical indexing will help you here - a for loop is also possible but would be much more complicated. Lets call your initial m...

How can I splitt up a big matrix into smaller matrises, splitting it up by values on the x-axis

Logical indexing will help you here - a for loop is also possible but would be much more complicated. Lets call your initial m...

oltre 4 anni fa | 0

Risposto

How can I create a random walk for a given function?

You can use a for loop, and then add your randomness in whatever way you like. Example: for i=1:100 %anything that follows will...

How can I create a random walk for a given function?

You can use a for loop, and then add your randomness in whatever way you like. Example: for i=1:100 %anything that follows will...

oltre 4 anni fa | 0

Risposto

Any idea how to do and represent ttest results on box plot?

Yes - the way forward is to compare 1 and 2, 1 and 3 and so on. You could look into some of the built-in tools in matlab, for ex...

Any idea how to do and represent ttest results on box plot?

Yes - the way forward is to compare 1 and 2, 1 and 3 and so on. You could look into some of the built-in tools in matlab, for ex...

oltre 4 anni fa | 0

Risposto

How can i add new value into next row in excel?

A simple solution: define a counter file that pertains to your GUI - lets call it rownumber. Save it manually the first time, to...

How can i add new value into next row in excel?

A simple solution: define a counter file that pertains to your GUI - lets call it rownumber. Save it manually the first time, to...

oltre 4 anni fa | 1

Risposto

while doing curve-fitting for custom equation, error is occuring??

If your input data contains or spans x=0, your first logaritm will not be defined. In addition, if your x exceeds 1, your second...

while doing curve-fitting for custom equation, error is occuring??

If your input data contains or spans x=0, your first logaritm will not be defined. In addition, if your x exceeds 1, your second...

oltre 4 anni fa | 0

Risposto

Delete 335 values every 335th time.

It is entirely possible that there is a much easier way to go about this - but here is nevertheless a way. I've made a for loop ...

Delete 335 values every 335th time.

It is entirely possible that there is a much easier way to go about this - but here is nevertheless a way. I've made a for loop ...

oltre 4 anni fa | 0

| accettato

Risposto

How can I check if the next generated row has no repetitions in the same columns in the previous row using a while loop

Your problem is that the check you add in the end, (s (:, j)) ~ = 1, examines if the sum in column j is more than 1 - but the in...

How can I check if the next generated row has no repetitions in the same columns in the previous row using a while loop

Your problem is that the check you add in the end, (s (:, j)) ~ = 1, examines if the sum in column j is more than 1 - but the in...

oltre 4 anni fa | 1

| accettato

Risposto

Calculating grades in a while loop

You don't need a while loop for that - it is easy with logic indexing, like so: score=[82 75 78 82 90 87]; A=score(score>=90)...

Calculating grades in a while loop

You don't need a while loop for that - it is easy with logic indexing, like so: score=[82 75 78 82 90 87]; A=score(score>=90)...

oltre 4 anni fa | 0

Risposto

How to plot an ultrashort light pulse

A true monochromatic laser beam can never achieve ultrashort pulse lenghts. Ultrashort pulses make use of interference of light ...

How to plot an ultrashort light pulse

A true monochromatic laser beam can never achieve ultrashort pulse lenghts. Ultrashort pulses make use of interference of light ...

oltre 4 anni fa | 0