how to obtain minimal surface of given coordinates?
Minimal in what sense? fill3( [0,50,50,0], [0,0,50,50], [50,10,50,10], 'y' ) ; grid on ;

más de 4 años ago | 0

How can I sort my data by within a sorting
[xyz_sorted, id] = sortrows( [x(:),y(:),z(:)] ) ;

más de 4 años ago | 0

How can I read a GeoJSON format file?
See this example: <https://www.mathworks.com/matlabcentral/fileexchange/49813-matlab%C2%AE-for-analyzing-and-visualizing-geos...

más de 4 años ago | 3

i'm getting vertcat and horizon error in a=[z A z] ..i dont know why?? pls tell me how to resolve
I'm not sure what you want to achieve with this, but I'd say that z=zeros(size(A,1),1); would at least make dimensions m...

más de 4 años ago | 0

Extract rectangular data from a non-rectangular file with header and convert to a structure of column vectors where field names are the second row of the rectangular data
The problem is that your file has discrepancies. If you look at the first row of data, it is missing an |e| before the |+04| in ...

más de 4 años ago | 1

| accepted

How do I sort filenames containing text and numbers in numerical order in MATLAB?
If, for any reason, you cannot install this function, you can sort your filenames as follows: [~, reindex] = sort( str2doubl...

más de 4 años ago | 7

| accepted

putting several matrices as one
A = randi( 10, 3, 2 ) B = randi( 10, 3, 5 ) C = [A, B]

más de 4 años ago | 2

what would be the command to save or open a particular excel data.xls with the designation in a particular drive or folder?
Here is an example. Make sure that the destination folder exists already. If not or if you have to create destination folders dy...

más de 4 años ago | 1

| accepted

finding consecutive NaN in matrix
>> x = [1,2,3,4,NaN,NaN,NaN,7,8,9] ; >> strfind( isnan(x), true(1,3) ) ans = 5 if you just need a "flag found", do...

más de 4 años ago | 0

| accepted

How do i remove the letter a user inputs from a word?
Simply: function [newStr, num] = removeLetter( str, letter ) newStr = regexprep( str, letter, '', 'ignorecase' ) ; ...

más de 4 años ago | 1

can i used cellfun with a function which has more than one input?
Yes, use an anonymous function (or define a function inline |=&gt;| name your anonymous function) to wrap the call to |chart_fun...

más de 4 años ago | 8

| accepted

ARRANGING TEXT FILE?
Here is an example, and then we can tailor the solution to your needs from there: content = fileread( 'TEST.txt' ) ; con...

más de 4 años ago | 0

| accepted

is subset S a subspace of R3?
Now that you have probably finished your exercise, here is |S| with the origin displayed as a red dot: <</matlabcentral/answe...

más de 4 años ago | 1

shift array to flat
plot( unnamed, 'b' ) ; hold on ; grid on ; x = (1 : length(unnamed)).' - 1 ; slope = (unnamed(end) - unnamed(1)) / (le...

más de 4 años ago | 0

| accepted

how should I copy the selected files to another folder whose name contains 'mytext'
Use copyfile( fname, dest ) ; % or movefile( fname, dest ) ; where |dest| can be defined as dest = fullfile( 'Dest...

más de 4 años ago | 1

| accepted

How can i find this minima?
While it is not a very robust method, these points are the last points of the curve before the derivative becomes very negative....

más de 4 años ago | 1

How to write a semifactorial function that iterates up to the input?
This is a good start as you are trying, as a first step, to operate a bit how you would proceed by hand, element by element in a...

más de 4 años ago | 1

Error when using isempty in a while loop

más de 4 años ago | 0

Finding Max difference between column vectors
If it is in absolute value: [M, I] = max( abs( A(:,5) - A(:,6) )) and otherwise remove the call to ABS. PS: if you wa...

más de 4 años ago | 3

| accepted

reject input if it is a string
Here is what I think you don't understand: INPUT evaluates what the user types unless called with a second |'s'| argument (in wh...

más de 4 años ago | 1

How can I include leading zeros in a number?
Store/read the user input as a string. Or, if you want to bring some flexibility, allow users to enter integers without lead...

más de 4 años ago | 13

Global variables - is there something better?
Look at my answer there if you want to try using a handle class: <https://www.mathworks.com/matlabcentral/answers/359410-is-it-p...

más de 4 años ago | 0

| accepted

How to simplify this code without having multilevel indexing error???
Here is one way. I build a simple test data set with 4 structs, each |ji| field contains 3 cells, and each cell contains a 2x2 n...

más de 4 años ago | 1

| accepted

Storing neighboring coordinates within a sphere from a 3D domain.
Use PDIST2 and get points within a distance smaller (or equal) to the center (node) than the radius. *EDIT :* here is a quick...

más de 4 años ago | 1

| accepted

Is it possible to avoid copy-on-write behavior in functions yet?
I agree with most of what is said in the comments/answers. Yet, if you really needed to avoid copies _for good reasons_ in a con...

más de 4 años ago | 5

How to load large number of files and perform looping through each file?
You can use the output of DIR to produce a struct array of file names/folders and iterate through files: D = dir( '*.txt' ) ...

más de 4 años ago | 0

How can I select multiple columns in a table using variable names and wildcards?
I am not using tables, so you should probably wait for a better answer, but here is one way that I could see. Say we have the ta...

más de 4 años ago | 1

| accepted

How to read text files form sub-sub folders

más de 4 años ago | 1

How to find the number of different strings in a cell array?
Use uc = unique(c) ; to get a cell array of unique strings, and its length is their count. If you need a stat of repet...

más de 4 años ago | 0

| accepted