Risposto

help with Tic Tac toe

Hmm, maybe I spoke too soon on the centering. Size can be set by adding a 'name,value' pair to the text command. text(x,y,play...

help with Tic Tac toe

Hmm, maybe I spoke too soon on the centering. Size can be set by adding a 'name,value' pair to the text command. text(x,y,play...

circa 3 anni fa | 0

| accettato

Domanda

dlmwrite does not append to file

I am writing headers and data to a text file, and I am able to write the headers using fprintf, so I know my filepath is correct...

circa 3 anni fa | 1 risposta | 0

Risposto

Access matrix values inside of a function

I believe this is the purpose of global variables, but I could be wrong. I don't really use them much.

Access matrix values inside of a function

I believe this is the purpose of global variables, but I could be wrong. I don't really use them much.

circa 3 anni fa | 0

| accettato

Risposto

How to average each row from two indivisual comlum vectors?

The mean command has an option to average in a specific dimension. A = [1 4; 2 3; 3 2; 4 1]; B = mean(A,2);

How to average each row from two indivisual comlum vectors?

The mean command has an option to average in a specific dimension. A = [1 4; 2 3; 3 2; 4 1]; B = mean(A,2);

circa 3 anni fa | 0

Risposto

Changing work space values

To change values for existing variables, you can define the new values for the variable in the command line, write/edit a script...

Changing work space values

To change values for existing variables, you can define the new values for the variable in the command line, write/edit a script...

circa 3 anni fa | 0

Risposto

How to pick files from sub-folder

I recommend using dir to capture all the contents of your parent folder within a variable. Then you can use the contents of that...

How to pick files from sub-folder

I recommend using dir to capture all the contents of your parent folder within a variable. Then you can use the contents of that...

circa 3 anni fa | 0

| accettato

Risposto

How can I allow the user to choose what to do?

Some basic ways to get input from the user include commands such as uigetfile, uigetdir, and input. I recommend the last, couple...

How can I allow the user to choose what to do?

Some basic ways to get input from the user include commands such as uigetfile, uigetdir, and input. I recommend the last, couple...

circa 3 anni fa | 0

| accettato

Risposto

How can I use loop to produce multiple graphs?

If you want individual graphs, add the following inside the loop, before the yyaxis command: ... figure(i) yyaxis left ... ...

How can I use loop to produce multiple graphs?

If you want individual graphs, add the following inside the loop, before the yyaxis command: ... figure(i) yyaxis left ... ...

circa 3 anni fa | 0

Risposto

Close actxserver file after deleting variables

For the record, I never did find a way to do this, instead I put a bit of code at the beginning of my script to look for an open...

Close actxserver file after deleting variables

For the record, I never did find a way to do this, instead I put a bit of code at the beginning of my script to look for an open...

circa 3 anni fa | 0

| accettato

Risposto

How to pull specific data from multiple excel sheets into a single table

Reading excel files in with MATLAB can be done in a couple of different ways. First is xlsread, which might be the most applicab...

How to pull specific data from multiple excel sheets into a single table

Reading excel files in with MATLAB can be done in a couple of different ways. First is xlsread, which might be the most applicab...

circa 3 anni fa | 0

Risposto

How to remove rows or Cols in MATLAB?

You can remove a section of an array in MATLAB by redefining the array without that specified section. For your example, of you ...

How to remove rows or Cols in MATLAB?

You can remove a section of an array in MATLAB by redefining the array without that specified section. For your example, of you ...

circa 3 anni fa | 1

Risposto

Loop through a list of excel file names in a folder

I recommend something like dir for automatic retrieval. Should be able to set it to find excel files only. pathname = 'yourfile...

Loop through a list of excel file names in a folder

I recommend something like dir for automatic retrieval. Should be able to set it to find excel files only. pathname = 'yourfile...

circa 3 anni fa | 0

Risposto

Interpolating missing values according to time vector

I don't know if there is a single command that would do what you're asking, though others might know of one. A fairly concise w...

Interpolating missing values according to time vector

I don't know if there is a single command that would do what you're asking, though others might know of one. A fairly concise w...

circa 3 anni fa | 1

Risposto

Interpolate value of point

I'm assuming you have the data for the surface points. If so, I believe interp2 will do what you're asking.

Interpolate value of point

I'm assuming you have the data for the surface points. If so, I believe interp2 will do what you're asking.

oltre 3 anni fa | 0

| accettato

Domanda

Close actxserver file after deleting variables

I have a script that opens an excel workbook in the actxserver so it can create plots for some data. I have been modifying the c...

oltre 3 anni fa | 1 risposta | 0

Risposto

Using for loops in order to find average of matrix

You can use mean to average all values in a certain direction. mu = 2; SD = 3; m = 1000; n = 100000; random_matrix = randn(...

Using for loops in order to find average of matrix

You can use mean to average all values in a certain direction. mu = 2; SD = 3; m = 1000; n = 100000; random_matrix = randn(...

oltre 3 anni fa | 1

| accettato

Risposto

Plotting for a Loop

Each time you run the plot command you're only plotting a single point, which doesn't work very well with plot. I recommend y...

Plotting for a Loop

Each time you run the plot command you're only plotting a single point, which doesn't work very well with plot. I recommend y...

oltre 3 anni fa | 0

| accettato

Risposto

Indexing to return segments

I can't actually use ischange in my version of MATLAB, so take what I suggest with a grain of salt. It looks like the index out...

Indexing to return segments

I can't actually use ischange in my version of MATLAB, so take what I suggest with a grain of salt. It looks like the index out...

oltre 3 anni fa | 1

Risposto

loop: stop if value repeats

I'm assuming you have all four of these commands within some kind of loop. Without the loop I have not tested what I'm going to ...

loop: stop if value repeats

I'm assuming you have all four of these commands within some kind of loop. Without the loop I have not tested what I'm going to ...

oltre 3 anni fa | 0

Risposto

How to sequentially import csv files, access, edit and save the data?

To save the results of a command each time you go through the loop you need to index the output. I recommend just adding a struc...

How to sequentially import csv files, access, edit and save the data?

To save the results of a command each time you go through the loop you need to index the output. I recommend just adding a struc...

oltre 3 anni fa | 0

Risposto

Creating matric of multiple arrays

You should be able to accomplish what you're looking for with some matrix indexing, no loop necessary. x = 1:100; k = 12; a =...

Creating matric of multiple arrays

You should be able to accomplish what you're looking for with some matrix indexing, no loop necessary. x = 1:100; k = 12; a =...

oltre 3 anni fa | 0

| accettato

Risposto

What is wrong with this code?

I would think you could do this with cellfun and some logic, but I could be wrong. cellfun(@(s) s((1:end)<0,1) = NaN,Radiidiffe...

What is wrong with this code?

I would think you could do this with cellfun and some logic, but I could be wrong. cellfun(@(s) s((1:end)<0,1) = NaN,Radiidiffe...

oltre 3 anni fa | 0

Risposto

Textscan for comma seperated file with mixed format

Have you tried using readtable? It has a delimited text option, and tends to be a bit better about handling different types of d...

Textscan for comma seperated file with mixed format

Have you tried using readtable? It has a delimited text option, and tends to be a bit better about handling different types of d...

oltre 3 anni fa | 0

| accettato

Risposto

Help with MATLAB code on low rank assumption using nuclear norm using CVX and Matlab!

I believe the issue is with calling Xe(:) instead of Xe. Others who know more might be able to correct me, but my working theory...

Help with MATLAB code on low rank assumption using nuclear norm using CVX and Matlab!

I believe the issue is with calling Xe(:) instead of Xe. Others who know more might be able to correct me, but my working theory...

oltre 3 anni fa | 0

Risposto

Error in importing the matlab ouput to excel file

It looks like you're trying to output a symbolic variable to excel, which I don't think is allowed. Try converting to double fir...

Error in importing the matlab ouput to excel file

It looks like you're trying to output a symbolic variable to excel, which I don't think is allowed. Try converting to double fir...

oltre 3 anni fa | 0

Risposto

multiple matrix step through for loop

Instead of doing a loop you can just do a bit of logic to the arrays. risk = ones(length(age),1,1); risk(age>=75&bmi>=50&smoke...

multiple matrix step through for loop

Instead of doing a loop you can just do a bit of logic to the arrays. risk = ones(length(age),1,1); risk(age>=75&bmi>=50&smoke...

oltre 3 anni fa | 0

| accettato

Risposto

For loop to repeat the loop with different set of value

You are seeing only the final results because you do not have your output variables indexed. for i=1:length(SNRDB) f...

For loop to repeat the loop with different set of value

You are seeing only the final results because you do not have your output variables indexed. for i=1:length(SNRDB) f...

circa 4 anni fa | 0

Risposto

Read every file in a folder

To get information on all the files in a folder use dir, or getdir. From there, just loop through the elements of the dir output...

Read every file in a folder

To get information on all the files in a folder use dir, or getdir. From there, just loop through the elements of the dir output...

circa 4 anni fa | 0

Risposto

Store values in an array from loop

I'm not sure what you mean by printing the 'name' associated to a data set, but there are my modifications to what you have setu...

Store values in an array from loop

I'm not sure what you mean by printing the 'name' associated to a data set, but there are my modifications to what you have setu...

circa 4 anni fa | 0

| accettato

Risposto

i need some help

If I'm understanding what you're trying to do, you're only missing parentheses. >> n = 10; >> p(10) = 2; >> p(n) p(n) = ...

i need some help

If I'm understanding what you're trying to do, you're only missing parentheses. >> n = 10; >> p(10) = 2; >> p(n) p(n) = ...

oltre 4 anni fa | 0