回答済み
Getting values from a for loop when specific condition met
break is like drawing the "Go To Jail" card in Monopoly--you "go directly to jail, do not pass GO, do not collect $200". Here w...

7年弱 前 | 0

| 採用済み

回答済み
Controlled Random Generator based off of two columns
function x=trafficX(RP,LO) % returns random count of X within upper limit RP but evenly divisible factor with lower limit LO %...

7年弱 前 | 0

| 採用済み

回答済み
How to sort a matrix's columns by using indexes
See doc sortrows Not clear which array it is you wish sorted but mayhaps can accomplish directly -- altho the auxiliary array ...

7年弱 前 | 0

回答済み
how to save all iteration output to plot graph later ?
In bending(i) = depl(1,:); you don't have but one index dimension on LHS in which you're trying to store a vector... Before the...

7年弱 前 | 0

回答済み
Switching an array of Vectors from Cartesian to Spherical Coordinates
The documentation syntax is pretty clear-- "[azimuth,elevation,r] = cart2sph(x,y,z) transforms corresponding elements of the Ca...

7年弱 前 | 0

回答済み
Question on Plotting from Cell Array
Dereference the cell array with the curlies "{}" for i=1:size(CA,2) scatter3(CA{i}(:,1),CA{i}(:,2),CA{i}(:,3)) if i==1,h...

7年弱 前 | 0

回答済み
Plot polyfit R-squared
Because >> fittedXA(1),fittedXA(end) ans = 10 ans = 20 >> and that's what you plotted as the abscissa for some re...

7年弱 前 | 0

| 採用済み

回答済み
Sorting Table Data by Groups of Rows
If the number of missing values is always 9, then extract the time column to a vector and t=datatable(:,1); % retrieve th...

7年弱 前 | 0

回答済み
matlab table from for loops
A table may not be the best for this purpose but iiuc what you're asking for would be something like Nrows=100; Num_of_Banks=r...

7年弱 前 | 1

| 採用済み

回答済み
Problem with plotting dates
Use readtable and maybe detectImportOptions first. Then, plot is datetime-aware, so you just call plot with the two variables.....

7年弱 前 | 0

回答済み
Geoscatter point size in km
I don't have the mapping TB so can't experiment, but looks like <geobubble> would be better suited to the purpose as it does hav...

7年弱 前 | 0

回答済み
Can I pass complex numbers from C++ to Matlab using feval or similar?
See mxCreateNumericMatrix for C interface. It can create a complex array. I suppose there's also a C++ version but "I know nut...

7年弱 前 | 0

| 採用済み

回答済み
Loop for mutliple (but variable) number of plots on multiple pages
Figure out how many figures you need a priori... nplots = 13; pperfigure=12; nfigures=ceil(nplots/pperfigure); nUp=pperfigur...

7年弱 前 | 0

| 採用済み

回答済み
Finding the sum of every nth row ( n is not fixed)
You'll have to introduce a day variable...by locating the positions where the hour returns to 0 if is always a 0-hour reading o...

7年弱 前 | 0

| 採用済み

回答済み
I have multiple equations that depend on a specific value and would like matlab to ask the user which equation to use and what the specific value is and then print that value but it's giving me trouble.
Do something more like: materials={'BK7','Fused Silica','Soda Lime','Borofloat','Air','NOA61'}; [material,ok] = listdlg('Promp...

7年弱 前 | 0

回答済み
How to neatly alternate between two different statements at different intervals
counter=0; Limit=10; for i=1:100 counter=counter+1; if counter<=Limit disp('A') else disp('B') counter...

7年弱 前 | 0

| 採用済み

回答済み
Help parsing predictably messy data
function getdata=a1(fname) % read file sections, return as cell array of sections for subsequent use fid=fopen(fname,'r'); ...

7年弱 前 | 0

| 採用済み

回答済み
Finding first rightmost non-zero column of a matrix?
Same solution as the other except search from the other end... find(any(A),1,'last') I think Azzi's solution there doesn't fin...

7年弱 前 | 0

| 採用済み

回答済み
Extract columns from multiple csv files
targetColumn=3; % don't bury magic numbers, use input() to set, maybe... rootdir = 'C:\Work\TESTIN...

7年弱 前 | 0

回答済み
To generate alternate 0's and 1's
One brute force way-- B=[]; for i=1:numel(A) B=[B (1-mod(i,2))*ones(1,A(i))]; end

7年弱 前 | 1

回答済み
How to solve "Matrix dimensions must agree" getting from Matlab.
OK...still a little unclear but I think I've got enough of a picture to at least lay out the general idea. It'd be a lot easier...

7年弱 前 | 0

回答済み
Data Linking And value reassignment for variables
I presume the "~-0" clause is to not eliminate i==j? Or can there be actual identical matches elsewhere? Either way the first...

7年弱 前 | 0

| 採用済み

回答済み
Troubleshooting Import big excel file
>> t=readtable('export.csv'); >> whos t Name Size Bytes Class Attributes t 45x255 ...

7年弱 前 | 1

| 採用済み

回答済み
How to solve "Matrix dimensions must agree" getting from Matlab.
if ('difficult = 0-back') & ('sleepstate = SD') is bad syntax on many fronts. First you've built a quoted string by usin...

7年弱 前 | 0

回答済み
Help concatenating a table row to a specific excel spreadsheet?
outputTable=table(VarNameStr,Screen_Grasp_Average,Grasp_Release_Average,difference); writetable(outputTable,D:\LocationName\Dat...

7年弱 前 | 0

| 採用済み

回答済み
FFT - How is the signal distributed between different frequency bins?
The frequency bins are fixed by the sampling rate; the magnitude of each bin is determined by the computation of the fourier coe...

7年弱 前 | 1

| 採用済み

回答済み
Plot function into subplots
for i=1:3 hAx(i)=subplot(3,1,i); plot(x(:,i),y(:,i)); end presuming all x,y are same length. If they're not, then savin...

7年弱 前 | 0

| 採用済み

回答済み
Set Properties.VariableContinuity to a single column in a timetable?
Per the documentation, ". This property can be an empty array, which is the default. If the array is not empty, then the number ...

7年弱 前 | 0

| 採用済み

回答済み
Colormap utility - two axes in colorbar
Yeah, it's doable...refinements needed, but general idea works. Z = peaks(20); [~,hCF]=contourf(Z,10); hAx=gca; ...

7年弱 前 | 1

| 採用済み

回答済み
download excel from web, webread doesn't work
Ah! That's actually a link to an Excel spreadsheet file, not web service data. Use websave('UMichSurvey.xls',url) ...

7年弱 前 | 0

| 採用済み

さらに読み込む