Question


ismethod(string('test'), 'endsWith') under R2016b and 2018b
R2016b: ismethod(string('asd'), 'endsWith') ans = logical(1) R2018b: ismethod(string('asd'), 'endsWith') ans = logical(0) ...

8 years ago | 2 answers | 0

2

answers

Answered
mex command with -largeArrayDims and/or -R2017b?
According to the answer of the technical support: The 64 bit addressing triggered by the -largeArrayDims flag is implicitly ena...

8 years ago | 4

| accepted

Answered
How to open files in different folders for data processing?
Since Matlab >= R2016b: List = dir('C:\Your\Data\Folder\**\FileName.txt'); FileName = fullfile({List.folder}, {List.name}); f...

8 years ago | 1

Answered
check variable within 5% of a fixed value
prms2 = inf; limit = abs(pstd2) * 0.05; while abs(prms2 - pstd2) < limit alphap = alphap*(pstd2/prms2); P = ((E/(...

8 years ago | 1

| accepted

Answered
ls command not working properly with Slurm
Using ls to get a list of files or folders is a bad idea in any way. It replies the list a char array, but it is hard to use. So...

8 years ago | 1

| accepted

Answered
add number to cell
I haven't seen a demand for such an indirekt algorithm yet, but if this really satisfies your needs, there is no reason to chang...

8 years ago | 1

| accepted

Answered
Vectorize a loop to save time
2 hours sounds long. Is the memory exhausted and the virtual memory slows down the execution? How large is the input? Is this a...

8 years ago | 0

| accepted

Answered
How can I merge vector elements into a single number of type double?
x = [1,2,3]; d = x * 10 .^ (numel(x)-1:-1:0).' % dot product

8 years ago | 2

Question


mex command with -largeArrayDims and/or -R2017b?
[New Formulation after only 5 views and no answer after 3 days] I want to compile a C file under different Matlab versions pref...

8 years ago | 1 answer | 1

1

answer

Answered
how can I show a video in axes in gui?
See the examples in doc videoreader

8 years ago | 0

Answered
Get list of webpages with a certain URL
It depends on the web service. Some services contain a list of links in a parent document, but some others don't. Remember that ...

8 years ago | 0

Answered
How can I convert a mexa64 file to mexmac64?
You can't. You have tio recompile the source code on a Mac to create a mexmac64 file.

8 years ago | 0

Answered
Why won't the MATLAB program on my computer work suddenly?
If a re-installation does not help, something must have been conserved during this procedure. The preferences folder does this: ...

8 years ago | 0

Answered
'exist' function returning false positive for directory.
Since R2017b the command isfolder is available and safer than exist('dir'). A problem of your approach is the usage of relative...

8 years ago | 2

| accepted

Answered
What can I change on the code below to make it run faster?
A small improvement is possible, when you exploit, that the terms of dcdt(4:6) are identical, but I assume this saves some perce...

8 years ago | 0

| accepted

Answered
add number to cell
I strongly recommend to avoid the smart and neat cellfun, if its compact notation confuses the programmer. A simple loop might l...

8 years ago | 1

Answered
How to find point closest to multiple circles?
A simple grid search with loops - just for demonstration: % Define circles: nCircle = 10; Center = rand(nCircle, 2); Radius...

8 years ago | 1

Answered
Plotting an image with its coordinates and RGB values
"X-Y-Z" does not sound like a 2D image, but like 3D voxels. See FEX: Search "voxel"

8 years ago | 0

Answered
How to loop the date vector, that the restrictions are the months,years and hours??
Logical indexing: for k = xa:y2 ka = (IntervaloHorarioDateVec(:,1) == k); % No FIND for m = 1:12 kb = (...

8 years ago | 0

| accepted

Answered
Matlab 2018 - Figure legend swamped by data2, data3, data4,... used to be able to just put single legend entry.. how to revert to previous behavior?
Do you mean: legend('WSP', 'Location', 'Northwest', 'AutoUpdate', 'off')

8 years ago | 0

| accepted

Answered
Can my code be written like this?
There is no "hat_r(k)" in your formula. A trailing parenthesis is missing also. total = 0; hc = conj(h_); for k = 1:K ...

8 years ago | 0

Answered
open a variable in a function
I cannot try it currently. Although the callback is called from the base workspace, the current workspace inside the callback is...

8 years ago | 0

Answered
Failure of fopen for a text file I have full access upon
The message is partially clear: "Failed to open the file because : Permission denied" You cannot open the file for writing, bu...

8 years ago | 0

Answered
Is there any better way for doing this specific "matrix multiplication"?
It is about 4 times faster to work with full matrices: tic; BB = full(B); CC = full(C); for i = 1:500 a = rand(na, 1); ...

8 years ago | 0

Answered
What is the fastest and most elegant way to calculate permutations of a vector of numbers?
Question 1: perms(1:3) * [100; 10; 1] Or the general case: v = [2,5,4,8]; r = perms(v) * 10.^(numel(v)-1:-1:0).' The multip...

8 years ago | 2

| accepted

Answered
Set title in two lines with different font sizes with interpreter latex
title(['\fontsize{12}{0}\selectfont$Large$', char(10), ... '\fontsize{8}{0}\selectfont$small$'], ... 'interprete...

8 years ago | 1

| accepted

Answered
fprintf no values in DAT file
I guess, that the file is written correctly, but not in the location you expect: fid=fopen('.\temperatureparallel.dat','w'); T...

8 years ago | 0

Answered
Why does it take so long to run a function?
If I change "endfunction" to end to convert your Octave code to Matlab, Matlab show an equivalent behaviour: Elapsed time is 0....

8 years ago | 1

| accepted

Answered
Horner's algorithm
To learn the basics, read the Getting Started chapters in the documentation. Read Matlab's Onramp also: https://matlabacademy.ma...

8 years ago | 0

Answered
Can i control Pop up menu depending on other pop up menu drop down
Yes. function Pop1_Callback(hObject, eventdata, handles) if isequal(hObject.Value, 1) handles.Pop2.Value = 1; end

8 years ago | 0

| accepted

Load more