Tag: c

63 votes
2 answers
2K views
arrayfun can be significantly slower than an explicit loop in matlab. Why?

Consider the following simple speed test for arrayfun: T = 4000; N = 500; x = randn(T, N); Func1 = @(a) (3*a^

avatar
Yolando
0 1 0 9
asked 07 September, 2021
52 votes
8 answers
1.3K views
How to search for a string in cell array in MATLAB?

Let's say I have the cell array strs = {'HA' 'KU' 'LA' 'MA' &ap

avatar
Winford
0 1 0 9
asked 07 September, 2021
55 votes
11 answers
846 views
How can I apply a function to every row/column of a matrix in MATLAB?

You can apply a function to every item in a vector by saying, for example, v + 1, or you can use the function

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
57 votes
10 answers
1.5K views
Matlab: Running an m-file from command-line

Suppose that; I have an m-file at location:C:\M1\M2\M3\mfile.m And exe file of the matlab is at this locatio

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
61 votes
8 answers
1.2K views
How to elegantly ignore some return values of a MATLAB function

Is it possible to get the 'nth' return value from a function without having to create dummy variable

avatar
Carmelina
0 1 0 9
asked 07 September, 2021
56 votes
9 answers
1.9K views
Using i and j as variables in MATLAB

i and j are very popular variable names (see e.g., this question and this one). For example, in loops: for i=1

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
59 votes
4 answers
2.6K views
Is MATLAB OOP slow or am I doing something wrong?

I'm experimenting with MATLAB OOP, as a start I mimicked my C++'s Logger classes and I'm puttin

avatar
Benton
0 1 0 9
asked 07 September, 2021
51 votes
12 answers
1.9K views
Why is MATLAB so fast in matrix multiplication?

I am making some benchmarks with CUDA, C++, C#, Java, and using MATLAB for verification and matrix generation.

avatar
Wei
0 1 0 9
asked 07 September, 2021
60 votes
9 answers
830 views
Is it possible to define more than one function per file in MATLAB, and access them from outside that file?

When I was studying for my undergraduate degree in EE, MATLAB required each function to be defined in its own

avatar
Majorie
0 1 0 9
asked 07 September, 2021
55 votes
10 answers
758 views
Representing and solving a maze given an image

What is the best way to represent and solve a maze given an image? Given an JPEG image (as seen above), wha

avatar
Serina
0 1 0 9
asked 07 September, 2021
52 votes
9 answers
746 views
Openstreetmap: embedding map in webpage (like Google Maps)

Is there a way to embed/mashup the OpenStreetMap in your page (like the way Google Maps API works)? I need to

avatar
Winford
0 1 0 9
asked 07 September, 2021
60 votes
4 answers
407 views
How to interpret API documentation function parameters?

Is there a standard to interpret the syntax of function interfaces in API documentations and if yes, how is it

avatar
Don
0 1 0 9
asked 07 September, 2021
61 votes
2 answers
2.6K views
API Keys vs HTTP Authentication vs OAuth in a RESTful API

I'm working on building a RESTful API for one of the applications I maintain. We're currently lookin

avatar
Hilario
0 1 0 9
asked 07 September, 2021
45 votes
7 answers
2.8K views
Allow Access-Control-Allow-Origin header using HTML5 fetch API

I am using HTML5 fetch API. var request = new Request('https://davidwalsh.name/demo/arsenal.json');

avatar
Freida
0 1 0 9
asked 07 September, 2021
56 votes
6 answers
731 views
How to send a correct authorization header for basic authentication

I am trying to POST data from my API but I can't pass the basic authentication. I try: $.ajax({ type: &

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
53 votes
11 answers
2.8K views
Do Google refresh tokens expire?

I have used the refresh token several times in just a short period for testing purposes, but I wonder whether

avatar
Virgil
0 1 0 9
asked 07 September, 2021
66 votes
14 answers
3K views
Couldn't process file resx due to its being in the Internet or Restricted zone or having the mark of the web on the file

I am facing an issue while debugging c# API Coding in Visual studio 2017. Debugging not started and showing a

avatar
Tana
0 1 0 9
asked 07 September, 2021
61 votes
6 answers
1.4K views
What is a callback URL in relation to an API?

I've been scouring the net, and can't seem to wrap my head around the idea of a callback URL. In my

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
59 votes
7 answers
786 views
How to use Android's camera or camera2 API to support old and new API versions without deprecation notes?

The new camera2 API confuses me. I want to develop an app (for Android APIs 10 - 21) which uses the device&apo

avatar
Janella
0 1 0 9
asked 07 September, 2021
60 votes
11 answers
2K views
App not setup: This app is still in development mode

I have followed the instructions here: The developers of this app have not set up this app properly for Facebo

avatar
Nereida
0 1 0 9
asked 07 September, 2021