Respondida
Can't find where the warning msg is from
Matlab fails to provide a meaningsful error message in this situation. It's left to the user to provide a work-around. Here i...

alrededor de 9 años hace | 2

Respondida
Hello I have a question with struct()
S = sum([output.timediff]);

alrededor de 9 años hace | 0

| aceptada

Respondida
How to assign index to array
Try >> M(:,end+1) = reshape( [1:size(M,1)], [],1 ); >> M M = 1 3 4 9 1 3 5 5...

alrededor de 9 años hace | 0

| aceptada

Enviada


tprintf
tprintf writes tabular data to a text file

alrededor de 9 años hace | 97 descargas |

0.0 / 5
Thumbnail

Respondida
Guide program - calculation of multiple data sets
Without details it is difficult to be specific. compile a "list", |sad|, of the files of the selected folders sad = dir(...

alrededor de 9 años hace | 1

Respondida
How To Detect Special Characters
>> str = regexp( '1asdf?', '[^\w]', 'match' ) str = '?' where I defined *not* being special as _"Any alphabetic,...

alrededor de 9 años hace | 1

Respondida
How can I create matrices out of a matrix?
L1_sample = L1( 1, : ); L1_remain = L1( 2:end, : ); should do it - I think

alrededor de 9 años hace | 0

| aceptada

Respondida
whenver i insert this if statement inside a for loop, i get an error. Could someone please explain why? Much appreciated!
*Comments* * *|isdouble|* is a special function of <https://uk.mathworks.com/help/fixedpoint/ref/isdouble.html the Fixed Poin...

alrededor de 9 años hace | 1

| aceptada

Respondida
How fprintf cell array and martix?
%% xx={'2017032312_8953';'2017032312_8978'}; yy=[10;11]; for jj = 1 : length( xx ) fprintf( '%s %3.1E \n', xx{...

alrededor de 9 años hace | 2

| aceptada

Respondida
How to Reduce Computation Time
The code analyzer box in the upper right corner tells you that there is potential for improving the code. Hovering over the smal...

alrededor de 9 años hace | 0

Respondida
How to generate random numbers between two numbers without any specific number?
_"[...] without any specific number?"_ &nbsp; I don't understand that. However, try >> 2 + rand*(33-2) ans = 26.8...

alrededor de 9 años hace | 0

Respondida
Memory problem reading data in large netcdf files for a single variable
Am I correct that you want to calculate the statistical measures (min, max, etc.) for 684x447 time series of 3250 hours length (...

alrededor de 9 años hace | 0

Respondida
Help debugging a code? Says function makes an error but when I run it, it returns the correct output...
IMO: Your code is a nightmare to debug and I will not try. There is a problem with *|output|*. It's not used as output. *...

alrededor de 9 años hace | 0

Respondida
Converting a string Array into a Char array
_"My intentions are to graph time vs. temp."_ %% [date, time, temp ] = textread('h:\m\cssm\data.txt','%s %s %f', 8 ); ...

alrededor de 9 años hace | 0

Respondida
how to subplot data from two matrix using for loop?
Problems with your code * *|A(i)|* outputs a scalar. You want *|A(:,i)|*, which outputs the i:th column * your code displaye...

más de 9 años hace | 0

| aceptada

Respondida
How do I go about using my MATLAB knowledge and transfer that to real world applications?
*MATLAB* &nbsp; The Mathworks have developed the Matlab programming language significantly over the last decade. Opinions expres...

más de 9 años hace | 0

| aceptada

Respondida
Function [output]=FunctionName(input)
Go to <https://uk.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html Create Functions in Files> and look for *...

más de 9 años hace | 1

| aceptada

Respondida
Importing cnv file with header lines
Given * the entire file fits in a fraction of the memory * **END** is the last line before the numerical part of the file. ...

más de 9 años hace | 1

| aceptada

Respondida
How do I make a list of objects that have specific properties?
An alternate approach %% Create some data loc = randi( [double('A'),double('D')], 1,8 ); loc_str = arrayfun( @char, l...

más de 9 años hace | 0

Respondida
Operations on variables with specific naming patterns
It's easier to say that dynamically named variables and *|eval|* is not a good idea than making recommendation regarding a desig...

más de 9 años hace | 0

| aceptada

Resuelto


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

más de 9 años hace

Resuelto


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

más de 9 años hace

Respondida
How to convert .mat file into text file in a specific format ?
I assume that the mat file contains a cell array named, *|x|* %% x={ 0.000000, 0.000000 0.500000, 0.333333 ...

más de 9 años hace | 0

Respondida
reading a txt file including dash
One way %% fid = fopen( 'DI_WATER.txt' ); cac = textscan( fid, '%f%f%f%f%f%f%f%f' ... , ...

más de 9 años hace | 0

| aceptada

Respondida
How to remove first charachter from a string inside a cell
One way with R2016a >> load 20_SVO.MAT >> data_SVO(:,3:4) = regexprep( data_SVO(:,3:4), '\$', '' ); >> data_SVO da...

más de 9 años hace | 0

| aceptada

Respondida
What's the cost of overwriting a variable versus clearing it every time it changes?
Comments * don't speculate; make a test * make it a habit to use the function, *|profile|* * see <http://wiki.c2.com/?Prem...

más de 9 años hace | 4

| aceptada

Respondida
How to convert from cell array to multidimensional array?
Loops are allowed if one remember to pre-allocate %% num = nan( 7, 7, 6, 10000 ); for jj = 1 : 10000 num(:,:,...

más de 9 años hace | 2

| aceptada

Respondida
Really easy one how to quickly repeat columns in an array
C = (1:10)'; M = repmat( C, [1,10] ); inspect the result >> whos C M Name Size Bytes Class ...

más de 9 años hace | 2

Respondida
Seperating strings and numbers using xlsread
Loops are allowed >> [ str, num ] = cssm0(); >> whos str num Name Size Bytes Class Attributes...

más de 9 años hace | 1

| aceptada

Respondida
How to store two tables resulting from a for loop
Yes, with something like this for jj = 1 : 2 T = something; filename = sprintf( 'myfile_%d', jj ); w...

más de 9 años hace | 0

| aceptada

Cargar más