Answered
is there any way to change y axis scale in gui panel(or figure)
In the figure window go to 'EDIT' -> 'Axis Properties'. From there the window should reopen with a bunch of new setting options....

7 years ago | 0

Answered
Undefined operator '-' for input arguments of type 'cell'.
Assuming that the error occurs on this line: obj=(sum(Tp-To).^2) then the issue is exactly as the error describes. Matla...

7 years ago | 0

Answered
extract information from cell array
You should be able to extract the data using the following: Grades = ''; for k = 1:length(textData); Grades = [Grade...

7 years ago | 0

Answered
How would I get this problem with initial value and increment inputs to print 25 lines?
TC=[start:incr:25*incr+start]; Did that do what you were looking for?

7 years ago | 0

| accepted

Answered
How to create a plot for an array?
Infos = sortrows(Info,2); Infos = flip(Infos,1); Infos(:,3) = [1:size(Infos,1)]'; scatter(Infos(:,3),Infos(:,2));

7 years ago | 0

Answered
"Undefined function or variable 'y'"
It's occurring because for your first number, x = 1, the if statement returns false, and so no value for y is defined, but then ...

7 years ago | 0

| accepted

Answered
Exporting cell arrays with different sizes to excel
What kind of data is contained within the inner cells? If there are more arrays I think you will likely have some problems. Here...

7 years ago | 0

| accepted

Answered
How to make the output value of previous iteration in a while loop an input value of the next iteration at each iteration until conditions are met
If a value is defined within a loop it will be retained until it is redefined through the next iteration. I would suggest that i...

7 years ago | 1

| accepted

Answered
Extracting data from excel and rewrite it into specific cell in a loop
The basic method for extracting data from Excel into Matlab is to use the xlsread() command. I would suggest reading all of the ...

7 years ago | 0

Answered
how to identify a row given a value in the stuct file
Typically, when looking to identify the row of a value you want to use the find() command. [row, col, val] = find(data_map....

7 years ago | 0

Answered
xlswrite formatting error. Naming multiple sheets
Using sheet = {} defines the variable 'sheet' as a cell containing a character string with the name. If you do sheet{1} or somet...

7 years ago | 0

| accepted

Question


Why is this code identifying more than one result?
I have written a code which looks through a database and plots certain things at a time. As far as I can tell, having all of my ...

7 years ago | 1 answer | 0

1

answer

Answered
How do I Take in input string and insert that string into an if statment
I usually make this kind of check with a string comparison as the if condition. if strcmp(input,'SI')==1; ... else ...

7 years ago | 0

Answered
I am having problems saving the result of a for loop to a new array
The issue is that your index is not an integer. Most of your index values are some tenth decimal place (0.1, 0.2, ...) which is ...

7 years ago | 0

Answered
How to read and write multiple excel sheets in Matlab?
xlsread() and xlswrite() are only capable of using one sheet at a time. To examine multiple sheets, the commands must be called ...

7 years ago | 0

Answered
How to store every matrix values that it's element changed in multiple loop
My best advice for saving the different values of Z is to add an extra dimension that ticks up each loop. Z(Z<=y(x)&Z>y(x-1...

7 years ago | 0

Answered
Filter a structure by a value of a field
Hmmm, just gonna wing it and see if this is correct. for k = 1:max(recEV(:).list); special = cluster_class(cluster_clas...

7 years ago | 0

Question


fprintf doesn't print anything
I am trying to write some data to a file using the fprintf command, but when I run the command the file remains blank. I don't r...

7 years ago | 1 answer | 0

1

answer

Answered
How calculate distance between points in matrices?
The distance between two points can be determined using the Pythagorean theorem. d = sqrt((x2-x1)^2+(y2-y1)^2+(z2-z1)^2); ...

7 years ago | 0

Answered
while loop and for loop get different result
The while loop doesn't produce the same plot because the values of t are not exactly the same as the values desired. If you look...

7 years ago | 0

Question


Comparing single element of one array with values of another array
I have an array A which is mx1. I have a second array, B, which is nx2. I would like to find the values of A which fall in betwe...

7 years ago | 1 answer | 0

1

answer

Answered
data analysis - 3D plot - Cartesian product of list
I could be totally wrong, but I think it's pretty simple. Just need a loop for your color parameter. Suppose we build plot3(A,B,...

7 years ago | 0

Answered
Check if columns of matrix are comprised in another matrix?
[C, IA, IB] = intersect(A,B,'rows'); This will check each row, and return the identical values in C, index in A, and index ...

7 years ago | 1

Answered
How to let the user put matrix not single element and divisible each element in that matrix
"Make function called somthing(x) that loops through the vector x and for each number ..." Your code does not currently have a l...

7 years ago | 1

| accepted

Answered
How could I finish the for loop?
First thing: [row,col]=find(stations(i)==stats(1)); This only looks at a single value of stations, so it can only return...

7 years ago | 0

| accepted

Question


Convert hex data to string
I have a file which contains hex data of the form: '45 2B 30 30 0D 0A 20 20 20 30 2E 30 30 30 30 45'. I'm trying to get a p...

7 years ago | 1 answer | 0

1

answer

Answered
Need help with loop for a heat transfer question
Since your code already calculates the temperature based on a thickness I think the most minimal change would be to turn L into ...

7 years ago | 0

| accepted

Answered
Why I cant make a loop from the textfile I chose?
new_wavelength(n) = p-step*10:step:p+step*10 new_wavelength(n) is only a single element, because n is a single value. new_w...

7 years ago | 0

Question


Removing specific characters from string in nested cells
I have a series of strings which are contained within a nested cell array (because regexp loves to nest cells), and I would like...

7 years ago | 2 answers | 0

2

answers

Answered
Problem creating loop using data from imported table/array - how to analyse & save data from each cycle?
Couple of things here. First for T(1) = data(1,1:501) you can't assign a matrix to a single double array element. If you are try...

7 years ago | 0

Load more