回答済み
Table's rows pow and the sum
totSum=sum(C(:).^2); or totSum=dot(C(:),C(:)); Not sure if either has speed advantage with size or not; haven't tes...

10年弱 前 | 0

回答済み
How to convert highest points of histogram into a simple line graph
Huh--I answered this early this AM but it seems to have not "stuck"--- Use the *histcounts* function with defined _edges_ vec...

10年弱 前 | 0

| 採用済み

回答済み
Variable not advancing as told to
_"...when i changes to 3, j should change to 3 as well but it's not happening"_ Looks like perfect place to use debugger to s...

10年弱 前 | 0

回答済み
Random but unique values in matrix
>> z=randi([0 1],100,13); % Generate trial array >> [u,ia,ib]=unique(z,'rows','stable'); % check for uniqueness between r...

10年弱 前 | 1

| 採用済み

回答済み
How to make output of a function available to script without function call?
[f1, f2] = function myFun(X,Y) You're missing the second output in the function definition. Without it, there's no way oth...

10年弱 前 | 0

回答済み
how can I store values generated from a nested loop into an arrray ?
Create independent index variables and increment them each pass thru the loop... "The Matlab way" would be to use the vectori...

10年弱 前 | 0

回答済み
How do I plot intensity of points on a scatter plot?
Nuthin' to it...try x=randn(100,1);y=randn(100,1); % sample data scatter(x,y,20*abs(y),y,'filled') colormap(hsv) ...

10年弱 前 | 0

回答済み
Find first non-zero column of a matrix
>> A=[zeros(5) randn(5)]; A=A(:,randperm(10)); % sample dataset A = -0.7440 1.0223 0 -0.7062 0 0.1257 ...

10年弱 前 | 2

| 採用済み

回答済み
extracting values from text files as matrix format
I'll presume you'll also want to know the week number... >> fid=fopen('semet.txt','r'); >> fmt1='%*s Week %f'; fmt...

10年弱 前 | 0

回答済み
I have a excel sheet and 1st column contains more than 1000 data. how do i put those data into 10, [] matrix and write in to txt file. Thanks
x=xlsread('yourspreadsheet.xls'); csvwrite('youroutputtextfile.csv',reshape(x,10,[]); Of course, if *mod(length(x),10)~=...

10年弱 前 | 1

回答済み
hello, i have monthly electricity demand for a year each month have just min and max vkues so for the whole year I have 24 vlues (min and max per month)?
About all you can do with that data, lacking even the daily demand what more the hourly, would be to average the weather data on...

10年弱 前 | 0

| 採用済み

回答済み
fprintf specific column from multiple text files to one csv sheet
_"Error using fprintf. Function is not defined for 'cell' inputs."_ Indeed it isn't; must cast to character array... fid...

10年弱 前 | 0

| 採用済み

回答済み
Matrix linear indexing: how to add more than once to the same index
>> ix=[1 3 1]; >> A(unique(ix))=A(unique(ix))+histc(ix,unique(ix)) A = 3 3 3 4 >> Keep a ...

10年弱 前 | 0

回答済み
what is the matlab code to remove header section of observation file in RINEX data
Try <https://www.ngs.noaa.gov/gps-toolbox/Borre2.htm>

10年弱 前 | 0

回答済み
Issue with positioning figure legend - should position lower left corner, but actually positions center
Actually, the position is the four-vector Position — Custom location and size four-element vector _[left, bottom, width, height...

10年弱 前 | 0

回答済み
Find value for a specific probability in probplot
Use the resulting output from *fitdist* and then *norminv*... fd=fitdist(vector,'normal'); p50=norminv(0.5,fd.mu,fd.sigma)...

約10年 前 | 1

| 採用済み

回答済み
I have a dataset. I want to do cross validation. How can I divide it into testing and training data ?
Just randomize over the overall list...

約10年 前 | 1

回答済み
vectorization by rows instead of elements
Well, without your other function, no can say, but M(1) = sqrt(A(1,1)^2 + A(1,2)^2 + ... A(1,n)^2) is simply M=sqrt...

約10年 前 | 0

回答済み
problem with hold on into a subplot inside a for loop
Several issues here... First, regarding *hold* and its use -- in general it's undesirable to set *hold on* until _after_ the ...

約10年 前 | 1

回答済み
trimming the first and last elements of a vector
Reassign in place... yhat=yhat(h+1:end-h);

約10年 前 | 0

| 採用済み

回答済み
Replacing values in a Matrix
A(A==yourvalue)=NewValue;

約10年 前 | 9

回答済み
Replacing the Maximum Element per Row of a Matrix with a Different Element
>> x=randi(20,4) x = 15 19 15 14 6 9 14 4 9 20 11 3 11 7 14 20 ...

約10年 前 | 0

回答済み
Double into Matrix of its Digits
Did you try it and see??? >> num2str(123) ans = 123 >> whos ans Name Size Bytes Class Att...

約10年 前 | 0

回答済み
How can I Read specific parts(formatted) of an unformatted text file?
Just read and ignore 'til you find the specific stuff looking for...*regexp* can do this or you can just read and test... f...

約10年 前 | 0

| 採用済み

回答済み
I can't read my .txt file using importdata. Problem with format?
OK, with the files you can do a file compare and see the difference-- C:\ML_R2012b\work\updated.txt - c:\ML_R2012b\wo...

約10年 前 | 0

| 採用済み

回答済み
Decimal places when multiplying by 1.1
Welcome to the wonderful, exciting and often wacky world of floating point arithmetic! >> 90*1.1-99 ans = 1.4211e-14 >...

約10年 前 | 1

| 採用済み

回答済み
What is missing from MATLAB?
IA's recent comment on axes and a small farm task to solve for boundaries of a field location to locate a line such that the sub...

約10年 前 | 1

回答済み
hi , my result show as following 1.3204e-05 , i need show it as numerical value
1.3204e-05 _is_ a numerical value, if you want a specific format other than default look at doc format to make the chang...

約10年 前 | 0

| 採用済み

回答済み
how to plot point with marker like a dart
See doc feather

約10年 前 | 0

| 採用済み

回答済み
Reduce comuting time: can I change a triple for-loop to a matrix formula?
For starters, carrying on from Sean's point, [r,c,p]=size(temp); % get size meanrs=zeros(r,c,p/12); % mod(p,12)-...

約10年 前 | 0

さらに読み込む